@gusto/embedded-react-sdk 0.55.7 → 0.55.8

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 (336) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/Common/FadeIn/FadeIn.module.scss.js +4 -4
  3. package/dist/components/Common/FieldCaption/FieldCaption.js +22 -18
  4. package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
  5. package/dist/components/Common/Flex/Flex.js +17 -15
  6. package/dist/components/Common/Flex/Flex.js.map +1 -1
  7. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  8. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  9. package/dist/components/Common/UI/Heading/Heading.module.scss.js +7 -7
  10. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  14. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  16. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  17. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  18. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  19. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  20. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  21. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +27 -27
  22. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  23. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -9
  24. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  25. package/dist/components/Company/Industry/Context.js +8 -7
  26. package/dist/components/Company/Industry/Context.js.map +1 -1
  27. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  28. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  29. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  30. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  31. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  32. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  33. package/dist/components/Company/PaySchedule/PaySchedule.js +45 -30
  34. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  35. package/dist/components/Company/PaySchedule/PayScheduleComponents.js +12 -11
  36. package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -1
  37. package/dist/components/Company/PaySchedule/PayScheduleForm.js +72 -55
  38. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  39. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +24 -20
  40. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
  41. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js +33 -29
  42. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
  43. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +131 -115
  44. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  45. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  46. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  47. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  48. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  49. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +5 -4
  50. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  51. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js +31 -29
  52. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js.map +1 -1
  53. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +110 -109
  54. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -1
  55. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js +21 -19
  56. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js.map +1 -1
  57. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js +56 -55
  58. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js.map +1 -1
  59. package/dist/components/Contractor/Dashboard/Dashboard.js +34 -33
  60. package/dist/components/Contractor/Dashboard/Dashboard.js.map +1 -1
  61. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +117 -115
  62. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -1
  63. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +77 -75
  64. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  65. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +44 -43
  66. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  67. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +40 -39
  68. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  69. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +35 -29
  70. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -1
  71. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +21 -20
  72. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  73. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +41 -40
  74. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  75. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +21 -20
  76. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  77. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +33 -32
  78. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  79. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +80 -78
  80. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  81. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +44 -43
  82. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  83. package/dist/components/Contractor/Submit/Submit.js +113 -105
  84. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  85. package/dist/components/Contractor/Submit/SubmitDone.js +11 -11
  86. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  87. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js +20 -18
  88. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
  89. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +18 -15
  90. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
  91. package/dist/components/Employee/Dashboard/Dashboard.js +33 -32
  92. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  93. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +21 -19
  94. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
  95. package/dist/components/Employee/Documents/management/DocumentManager.js +34 -26
  96. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  97. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  98. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  99. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +30 -29
  100. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  101. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +54 -53
  102. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  103. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +29 -28
  104. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
  105. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +16 -15
  106. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  107. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +27 -25
  108. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  109. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +89 -80
  110. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
  111. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js +22 -20
  112. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
  113. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +25 -24
  114. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
  115. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +1 -1
  116. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
  117. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  118. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js +19 -17
  119. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
  120. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +80 -79
  121. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  122. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
  123. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
  124. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +40 -39
  125. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  126. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +34 -33
  127. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  128. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +43 -41
  129. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
  130. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +22 -21
  131. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  132. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js +19 -17
  133. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
  134. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +120 -116
  135. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  136. package/dist/components/Flow/Flow.js +1 -1
  137. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +29 -29
  138. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  139. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +37 -36
  140. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  141. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +37 -36
  142. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  143. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +35 -28
  144. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
  145. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +27 -26
  146. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  147. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  148. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  149. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +52 -51
  150. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  151. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +34 -33
  152. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  153. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +23 -21
  154. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
  155. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +26 -19
  156. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
  157. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +14 -12
  158. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  159. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +112 -109
  160. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  161. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +67 -65
  162. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  163. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +43 -41
  164. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  165. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +225 -223
  166. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  167. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js +78 -75
  168. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js.map +1 -1
  169. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js +27 -27
  170. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js.map +1 -1
  171. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.js +19 -19
  172. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.js.map +1 -1
  173. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js +51 -48
  174. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js.map +1 -1
  175. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +58 -48
  176. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  177. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +58 -57
  178. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  179. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +83 -69
  180. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  181. package/dist/components/Payroll/PayrollList/PayrollList.js +62 -60
  182. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  183. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +119 -117
  184. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  185. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +101 -99
  186. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  187. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +120 -110
  188. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  189. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +20 -14
  190. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  191. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +39 -38
  192. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  193. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.js +24 -17
  194. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.js.map +1 -1
  195. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.js +17 -17
  196. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.js.map +1 -1
  197. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js +88 -80
  198. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js.map +1 -1
  199. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.js +26 -26
  200. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.js.map +1 -1
  201. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +32 -32
  202. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  203. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +50 -48
  204. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  205. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +34 -33
  206. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  207. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
  208. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +28 -24
  209. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  210. package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.js +255 -228
  211. package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.js.map +1 -1
  212. package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.module.scss.js +8 -4
  213. package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.module.scss.js.map +1 -1
  214. package/dist/components/Payroll/usePreparedPayrollData.js +4 -3
  215. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  216. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +5 -5
  217. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
  218. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +8 -7
  219. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
  220. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +51 -50
  221. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  222. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +20 -18
  223. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  224. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +51 -49
  225. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  226. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +20 -20
  227. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  228. package/dist/components/TimeOff/PolicyList/PolicyList.js +50 -49
  229. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  230. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +34 -33
  231. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  232. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +46 -45
  233. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  234. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +152 -143
  235. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  236. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +14 -13
  237. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
  238. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +44 -35
  239. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  240. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +88 -71
  241. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  242. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +164 -155
  243. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  244. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +57 -55
  245. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  246. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +25 -24
  247. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  248. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +94 -92
  249. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  250. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +156 -155
  251. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  252. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +21 -19
  253. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  254. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +28 -26
  255. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  256. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  257. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js.map +1 -1
  258. package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
  259. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  260. package/dist/i18n/en/Payroll.UNSTABLE_PayrollEditEmployee.json.js +62 -58
  261. package/dist/i18n/en/Payroll.UNSTABLE_PayrollEditEmployee.json.js.map +1 -1
  262. package/dist/package.json.js +1 -1
  263. package/dist/src/components/Common/FieldCaption/FieldCaption.d.ts +2 -16
  264. package/dist/src/components/Common/FieldCaption/FieldCaptionTypes.d.ts +22 -0
  265. package/dist/src/components/Common/FieldCaption/index.d.ts +1 -0
  266. package/dist/src/components/Common/Flex/Flex.d.ts +3 -1
  267. package/dist/src/components/Company/PaySchedule/PaySchedule.d.ts +10 -2
  268. package/dist/src/components/Company/PaySchedule/PayScheduleComponents.d.ts +1 -0
  269. package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +9 -1
  270. package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/index.d.ts +2 -2
  271. package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +21 -5
  272. package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +21 -3
  273. package/dist/src/components/Contractor/ContractorList/management/ManagementContractorListView.d.ts +3 -1
  274. package/dist/src/components/Contractor/ContractorList/onboarding/ContractorListView.d.ts +3 -1
  275. package/dist/src/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +3 -1
  276. package/dist/src/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
  277. package/dist/src/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +3 -1
  278. package/dist/src/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +3 -1
  279. package/dist/src/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +3 -1
  280. package/dist/src/components/Contractor/Submit/SubmitDone.d.ts +3 -1
  281. package/dist/src/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -1
  282. package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +3 -1
  283. package/dist/src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +3 -1
  284. package/dist/src/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +3 -1
  285. package/dist/src/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +3 -1
  286. package/dist/src/components/Employee/EmployeeList/shared/useEmployeeList.d.ts +4 -0
  287. package/dist/src/components/Employee/HomeAddress/management/HomeAddressView.d.ts +3 -1
  288. package/dist/src/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +3 -1
  289. package/dist/src/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +3 -1
  290. package/dist/src/components/Employee/WorkAddress/management/WorkAddressView.d.ts +3 -1
  291. package/dist/src/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +3 -1
  292. package/dist/src/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  293. package/dist/src/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +2 -0
  294. package/dist/src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +3 -1
  295. package/dist/src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  296. package/dist/src/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +3 -1
  297. package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.d.ts +9 -9
  298. package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.d.ts +2 -2
  299. package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.d.ts +4 -4
  300. package/dist/src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +3 -1
  301. package/dist/src/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -1
  302. package/dist/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  303. package/dist/src/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +2 -1
  304. package/dist/src/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +1 -1
  305. package/dist/src/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +2 -0
  306. package/dist/src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +3 -1
  307. package/dist/src/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.d.ts +1 -1
  308. package/dist/src/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +1 -1
  309. package/dist/src/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +1 -1
  310. package/dist/src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
  311. package/dist/src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +2 -0
  312. package/dist/src/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +2 -0
  313. package/dist/src/components/TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -1
  314. package/dist/src/components/TimeOff/PolicyList/PolicyListTypes.d.ts +2 -0
  315. package/dist/src/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
  316. package/dist/src/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +2 -0
  317. package/dist/src/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -1
  318. package/dist/src/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +2 -0
  319. package/dist/src/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  320. package/dist/src/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  321. package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +2 -0
  322. package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  323. package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +2 -0
  324. package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +2 -0
  325. package/dist/src/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
  326. package/dist/src/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +3 -0
  327. package/dist/src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
  328. package/dist/src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +2 -0
  329. package/dist/src/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  330. package/dist/src/contexts/ComponentAdapter/useComponentContext.d.ts +4 -1
  331. package/dist/src/contexts/UnstableFeaturesProvider/useUnstableFeature.d.ts +4 -1
  332. package/dist/src/i18n/types.d.ts +28 -2
  333. package/dist/src/index.d.ts +1 -1
  334. package/dist/src/models/external.d.ts +1 -0
  335. package/dist/style.css +1 -1
  336. package/package.json +16 -15
@@ -1,5 +1,5 @@
1
1
  import { z as o } from "zod";
2
- import { FilingForm as r, TaxPayerType as e } from "@gusto/embedded-api/models/components/federaltaxdetails";
2
+ import { FilingForm as r, TaxPayerType as t } from "@gusto/embedded-api/models/components/federaltaxdetails";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-error-boundary";
@@ -11,21 +11,22 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
11
11
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
12
12
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
13
13
  import "@gusto/embedded-api/models/errors/httpclienterrors";
14
+ import "dompurify";
15
+ import "../../../contexts/LocaleProvider/useLocale.js";
14
16
  import "../../../shared/constants.js";
15
17
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
- import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
18
- const b = o.object({
18
+ import { createCompoundContext as e } from "../../Base/createCompoundContext.js";
19
+ const j = o.object({
19
20
  federalEin: o.string().optional(),
20
- taxPayerType: o.enum(Object.values(e)).optional(),
21
+ taxPayerType: o.enum(Object.values(t)).optional(),
21
22
  filingForm: o.enum(Object.values(r)).optional(),
22
23
  legalName: o.string().min(1)
23
- }), [j, v] = t(
24
+ }), [v, P] = e(
24
25
  "CompanyFederalTaxesContext"
25
26
  );
26
27
  export {
27
- b as FederalTaxFormSchema,
28
- v as FederalTaxesProvider,
29
- j as useFederalTaxes
28
+ j as FederalTaxFormSchema,
29
+ P as FederalTaxesProvider,
30
+ v as useFederalTaxes
30
31
  };
31
32
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\n/** @internal */\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\n/**\n * Pre-populated values for the company federal tax form, supplied via {@link FederalTaxesProps}.\n * At least one of `taxPayerType`, `filingForm`, or `legalName` must be provided.\n *\n * @public\n */\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAOO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAsBK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\n/** @internal */\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\n/**\n * Pre-populated values for the company federal tax form, supplied via {@link FederalTaxesProps}.\n * At least one of `taxPayerType`, `filingForm`, or `legalName` must be provided.\n *\n * @public\n */\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;;AAOO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAsBK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -9,19 +9,20 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../shared/constants.js";
13
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const [P, f] = t("IndustryItems", {
17
+ const [f, v] = t("IndustryItems", {
17
18
  items: []
18
- }), [v, x] = t("IndustryApi", {
19
+ }), [x, C] = t("IndustryApi", {
19
20
  isPending: !1
20
21
  });
21
22
  export {
22
- x as IndustryApiStateProvider,
23
- f as IndustryItemsProvider,
24
- v as useIndustryApiState,
25
- P as useIndustryItems
23
+ C as IndustryApiStateProvider,
24
+ v as IndustryItemsProvider,
25
+ x as useIndustryApiState,
26
+ f as useIndustryItems
26
27
  };
27
28
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
@@ -9,15 +9,16 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [L, f] = o(
17
+ const [f, v] = o(
17
18
  "CompanyDocumentFormContext"
18
19
  );
19
20
  export {
20
- f as LocationsFormProvider,
21
- L as useLocationsForm
21
+ v as LocationsFormProvider,
22
+ f as useLocationsForm
22
23
  };
23
24
  //# sourceMappingURL=useLocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -9,15 +9,16 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [f, v] = o(
17
+ const [v, y] = o(
17
18
  "CompanyDocumentListContext"
18
19
  );
19
20
  export {
20
- v as LocationsListProvider,
21
- f as useLocationsList
21
+ y as LocationsListProvider,
22
+ v as useLocationsList
22
23
  };
23
24
  //# sourceMappingURL=useLocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n isFetching?: boolean\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n isFetching?: boolean\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -9,13 +9,14 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../shared/constants.js";
13
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
- const [C, c] = o("OnboardingOverviewContext");
17
+ const [c, s] = o("OnboardingOverviewContext");
17
18
  export {
18
- c as OnboardingOverviewProvider,
19
- C as useOnboardingOverview
19
+ s as OnboardingOverviewProvider,
20
+ c as useOnboardingOverview
20
21
  };
21
22
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
@@ -1,43 +1,58 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useState as u, useMemo as l } from "react";
3
- import { createMachine as p } from "robot3";
4
- import { usePaySchedulesGetAllSuspense as h } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
5
- import { payScheduleStateMachine as S } from "./payScheduleStateMachine.js";
6
- import { PayScheduleListContextual as d, PayScheduleFormContextual as f } from "./PayScheduleComponents.js";
7
- import { BaseComponent as y } from "../../Base/Base.js";
8
- import { useBase as C } from "../../Base/useBase.js";
9
- import { useI18n as P, useComponentDictionary as x } from "../../../i18n/I18n.js";
10
- import { Flow as M } from "../../Flow/Flow.js";
11
- const L = ({
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { useState as l, useMemo as p } from "react";
3
+ import { createMachine as h } from "robot3";
4
+ import { usePaySchedulesGetAllSuspense as S } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
5
+ import { payScheduleStateMachine as d } from "./payScheduleStateMachine.js";
6
+ import { PayScheduleListContextual as f, PayScheduleFormContextual as y } from "./PayScheduleComponents.js";
7
+ import { BaseComponent as C } from "../../Base/Base.js";
8
+ import { useBase as P } from "../../Base/useBase.js";
9
+ import { useI18n as x, useComponentDictionary as M } from "../../../i18n/I18n.js";
10
+ import { Flow as B } from "../../Flow/Flow.js";
11
+ const D = ({
12
12
  companyId: e,
13
- defaultValues: t,
14
- dictionary: n,
13
+ defaultValues: o,
14
+ disableWorkweekStartDayEditing: t,
15
+ dictionary: r,
15
16
  ...i
16
- }) => /* @__PURE__ */ r(y, { ...i, children: /* @__PURE__ */ r(w, { companyId: e, defaultValues: t, dictionary: n }) });
17
- function w({ companyId: e, defaultValues: t, dictionary: n }) {
18
- P("Company.PaySchedule"), x("Company.PaySchedule", n);
19
- const { onEvent: i } = C(), { data: s } = h({ companyId: e }), [{ initialState: a, initialComponent: m }] = u(() => {
20
- const o = (s.payScheduleShowResponse?.length ?? 0) > 0;
17
+ }) => /* @__PURE__ */ m(C, { ...i, children: /* @__PURE__ */ m(
18
+ F,
19
+ {
20
+ companyId: e,
21
+ defaultValues: o,
22
+ disableWorkweekStartDayEditing: t,
23
+ dictionary: r
24
+ }
25
+ ) });
26
+ function F({
27
+ companyId: e,
28
+ defaultValues: o,
29
+ disableWorkweekStartDayEditing: t,
30
+ dictionary: r
31
+ }) {
32
+ x("Company.PaySchedule"), M("Company.PaySchedule", r);
33
+ const { onEvent: i } = P(), { data: s } = S({ companyId: e }), [{ initialState: a, initialComponent: c }] = l(() => {
34
+ const n = (s.payScheduleShowResponse?.length ?? 0) > 0;
21
35
  return {
22
- initialState: o ? "listSchedules" : "addSchedule",
23
- initialComponent: o ? d : f
36
+ initialState: n ? "listSchedules" : "addSchedule",
37
+ initialComponent: n ? f : y
24
38
  };
25
- }), c = l(
26
- () => p(
39
+ }), u = p(
40
+ () => h(
27
41
  a,
28
- S,
29
- (o) => ({
30
- ...o,
31
- component: m,
42
+ d,
43
+ (n) => ({
44
+ ...n,
45
+ component: c,
32
46
  companyId: e,
33
- defaultValues: t
47
+ defaultValues: o,
48
+ disableWorkweekStartDayEditing: t
34
49
  })
35
50
  ),
36
- [e, t, a, m]
51
+ [e, o, t, a, c]
37
52
  );
38
- return /* @__PURE__ */ r(M, { machine: c, onEvent: i });
53
+ return /* @__PURE__ */ m(B, { machine: u, onEvent: i });
39
54
  }
40
55
  export {
41
- L as PaySchedule
56
+ D as PaySchedule
42
57
  };
43
58
  //# sourceMappingURL=PaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { createMachine } from 'robot3'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { payScheduleStateMachine } from './payScheduleStateMachine'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport type { PayScheduleFormData } from './shared/usePayScheduleForm/payScheduleSchema'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport type { BaseComponentKeys } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * The full set of fields that may be pre-filled on the {@link PaySchedule} create form.\n *\n * @public\n */\nexport type PayScheduleDefaultFields = {\n [\n K in keyof Pick<\n PayScheduleFormData,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n ]: NonNullable<PayScheduleFormData[K]>\n}\n\n/**\n * Default values for the {@link PaySchedule} form fields. Server data for an existing pay schedule\n * takes precedence over these defaults when editing.\n *\n * @public\n */\nexport type PayScheduleDefaultValues = RequireAtLeastOne<Partial<PayScheduleDefaultFields>>\n\n/**\n * Props for the {@link PaySchedule} component.\n *\n * @public\n */\nexport interface PayScheduleProps extends BaseComponentInterface<'Company.PaySchedule'> {\n /** Identifier of the company whose pay schedules are managed. */\n companyId: string\n /** Default values used to pre-fill the create form. Ignored fields not listed in {@link PayScheduleDefaultValues}. */\n defaultValues?: PayScheduleDefaultValues\n}\n\n/**\n * Manages a company's pay schedules, including listing existing schedules and creating or editing one.\n *\n * @remarks\n * Renders the schedule list when at least one pay schedule exists and the create form otherwise.\n * Emits the following events through `onEvent`:\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `paySchedule/created` | A new pay schedule was created | The created pay schedule entity |\n * | `paySchedule/updated` | An existing pay schedule was updated | The updated pay schedule entity |\n *\n * @param props - {@link PayScheduleProps} plus the standard base component props.\n * @returns The pay schedule list or form depending on whether any schedules exist.\n * @public\n */\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps) => {\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues} dictionary={dictionary} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, defaultValues, dictionary }: Omit<PayScheduleProps, BaseComponentKeys>) {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n const { onEvent } = useBase()\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n // Freeze the initial routing decision. Recomputing it after a later refetch (e.g. once\n // the first schedule is created) would re-seat the machine and orphan its interpreter.\n const [{ initialState, initialComponent }] = useState<{\n initialState: keyof typeof payScheduleStateMachine\n initialComponent: typeof PayScheduleListContextual | typeof PayScheduleFormContextual\n }>(() => {\n const hasSchedules = (paySchedules.payScheduleShowResponse?.length ?? 0) > 0\n return {\n initialState: hasSchedules ? 'listSchedules' : 'addSchedule',\n initialComponent: hasSchedules ? PayScheduleListContextual : PayScheduleFormContextual,\n }\n })\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","jsx","BaseComponent","Root","useI18n","useComponentDictionary","onEvent","useBase","paySchedules","usePaySchedulesGetAllSuspense","initialState","initialComponent","useState","hasSchedules","PayScheduleListContextual","PayScheduleFormContextual","machine","useMemo","createMachine","payScheduleStateMachine","initialContext","Flow"],"mappings":";;;;;;;;;;AAkEO,MAAMA,IAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAK,WAAAN,GAAsB,eAAAC,GAA8B,YAAAC,EAAA,CAAwB,EAAA,CACpF;AAIJ,SAASI,EAAK,EAAE,WAAAN,GAAW,eAAAC,GAAe,YAAAC,KAAyD;AACjG,EAAAK,EAAQ,qBAAqB,GAC7BC,EAAuB,uBAAuBN,CAAU;AACxD,QAAM,EAAE,SAAAO,EAAA,IAAYC,EAAA,GACd,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAZ,GAAW,GAIpE,CAAC,EAAE,cAAAa,GAAc,kBAAAC,GAAkB,IAAIC,EAG1C,MAAM;AACP,UAAMC,KAAgBL,EAAa,yBAAyB,UAAU,KAAK;AAC3E,WAAO;AAAA,MACL,cAAcK,IAAe,kBAAkB;AAAA,MAC/C,kBAAkBA,IAAeC,IAA4BC;AAAA,IAAA;AAAA,EAEjE,CAAC,GAEKC,IAAUC;AAAA,IACd,MACEC;AAAA,MACER;AAAA,MACAS;AAAA,MACA,CAACC,OAAiD;AAAA,QAChD,GAAGA;AAAA,QACH,WAAWT;AAAA,QACX,WAAAd;AAAA,QACA,eAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACD,GAAWC,GAAeY,GAAcC,CAAgB;AAAA,EAAA;AAG3D,SAAO,gBAAAV,EAACoB,GAAA,EAAK,SAAAL,GAAkB,SAAAV,EAAA,CAAkB;AACnD;"}
1
+ {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { createMachine } from 'robot3'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { payScheduleStateMachine } from './payScheduleStateMachine'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport type { PayScheduleFormData } from './shared/usePayScheduleForm/payScheduleSchema'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport type { BaseComponentKeys } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * The full set of fields that may be pre-filled on the {@link PaySchedule} create form.\n *\n * @public\n */\nexport type PayScheduleDefaultFields = {\n [\n K in keyof Pick<\n PayScheduleFormData,\n | 'anchorPayDate'\n | 'anchorEndOfPayPeriod'\n | 'day1'\n | 'day2'\n | 'customName'\n | 'frequency'\n | 'workweekStartDay'\n >\n ]: NonNullable<PayScheduleFormData[K]>\n}\n\n/**\n * Default values for the {@link PaySchedule} form fields. Server data for an existing pay schedule\n * takes precedence over these defaults when editing.\n *\n * @public\n */\nexport type PayScheduleDefaultValues = RequireAtLeastOne<Partial<PayScheduleDefaultFields>>\n\n/**\n * Props for the {@link PaySchedule} component.\n *\n * @public\n */\nexport interface PayScheduleProps extends BaseComponentInterface<'Company.PaySchedule'> {\n /** Identifier of the company whose pay schedules are managed. */\n companyId: string\n /** Default values used to pre-fill the create form. Ignored fields not listed in {@link PayScheduleDefaultValues}. */\n defaultValues?: PayScheduleDefaultValues\n /**\n * Renders the workweek start day field disabled while still submitting its current value,\n * for partners that compute the workweek start day themselves and don't want end users\n * editing it directly. Defaults to `false`.\n *\n * @alpha\n */\n disableWorkweekStartDayEditing?: boolean\n}\n\n/**\n * Manages a company's pay schedules, including listing existing schedules and creating or editing one.\n *\n * @remarks\n * Renders the schedule list when at least one pay schedule exists and the create form otherwise.\n * Emits the following events through `onEvent`:\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `paySchedule/created` | A new pay schedule was created | The created pay schedule entity |\n * | `paySchedule/updated` | An existing pay schedule was updated | The updated pay schedule entity |\n *\n * @param props - {@link PayScheduleProps} plus the standard base component props.\n * @returns The pay schedule list or form depending on whether any schedules exist.\n * @public\n */\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n disableWorkweekStartDayEditing,\n dictionary,\n ...props\n}: PayScheduleProps) => {\n return (\n <BaseComponent {...props}>\n <Root\n companyId={companyId}\n defaultValues={defaultValues}\n disableWorkweekStartDayEditing={disableWorkweekStartDayEditing}\n dictionary={dictionary}\n />\n </BaseComponent>\n )\n}\n\nfunction Root({\n companyId,\n defaultValues,\n disableWorkweekStartDayEditing,\n dictionary,\n}: Omit<PayScheduleProps, BaseComponentKeys>) {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n const { onEvent } = useBase()\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n // Freeze the initial routing decision. Recomputing it after a later refetch (e.g. once\n // the first schedule is created) would re-seat the machine and orphan its interpreter.\n const [{ initialState, initialComponent }] = useState<{\n initialState: keyof typeof payScheduleStateMachine\n initialComponent: typeof PayScheduleListContextual | typeof PayScheduleFormContextual\n }>(() => {\n const hasSchedules = (paySchedules.payScheduleShowResponse?.length ?? 0) > 0\n return {\n initialState: hasSchedules ? 'listSchedules' : 'addSchedule',\n initialComponent: hasSchedules ? PayScheduleListContextual : PayScheduleFormContextual,\n }\n })\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 disableWorkweekStartDayEditing,\n }),\n ),\n [companyId, defaultValues, disableWorkweekStartDayEditing, initialState, initialComponent],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["PaySchedule","companyId","defaultValues","disableWorkweekStartDayEditing","dictionary","props","jsx","BaseComponent","Root","useI18n","useComponentDictionary","onEvent","useBase","paySchedules","usePaySchedulesGetAllSuspense","initialState","initialComponent","useState","hasSchedules","PayScheduleListContextual","PayScheduleFormContextual","machine","useMemo","createMachine","payScheduleStateMachine","initialContext","Flow"],"mappings":";;;;;;;;;;AAgFO,MAAMA,IAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gCAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC;AAAA,EAACE;AAAA,EAAA;AAAA,IACC,WAAAP;AAAA,IACA,eAAAC;AAAA,IACA,gCAAAC;AAAA,IACA,YAAAC;AAAA,EAAA;AAAA,GAEJ;AAIJ,SAASI,EAAK;AAAA,EACZ,WAAAP;AAAA,EACA,eAAAC;AAAA,EACA,gCAAAC;AAAA,EACA,YAAAC;AACF,GAA8C;AAC5C,EAAAK,EAAQ,qBAAqB,GAC7BC,EAAuB,uBAAuBN,CAAU;AACxD,QAAM,EAAE,SAAAO,EAAA,IAAYC,EAAA,GACd,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAb,GAAW,GAIpE,CAAC,EAAE,cAAAc,GAAc,kBAAAC,GAAkB,IAAIC,EAG1C,MAAM;AACP,UAAMC,KAAgBL,EAAa,yBAAyB,UAAU,KAAK;AAC3E,WAAO;AAAA,MACL,cAAcK,IAAe,kBAAkB;AAAA,MAC/C,kBAAkBA,IAAeC,IAA4BC;AAAA,IAAA;AAAA,EAEjE,CAAC,GAEKC,IAAUC;AAAA,IACd,MACEC;AAAA,MACER;AAAA,MACAS;AAAA,MACA,CAACC,OAAiD;AAAA,QAChD,GAAGA;AAAA,QACH,WAAWT;AAAA,QACX,WAAAf;AAAA,QACA,eAAAC;AAAA,QACA,gCAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACF,GAAWC,GAAeC,GAAgCY,GAAcC,CAAgB;AAAA,EAAA;AAG3F,SAAO,gBAAAV,EAACoB,GAAA,EAAK,SAAAL,GAAkB,SAAAV,EAAA,CAAkB;AACnD;"}
@@ -1,26 +1,27 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { PayScheduleList as a } from "./PayScheduleList.js";
2
+ import { PayScheduleList as d } from "./PayScheduleList.js";
3
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";
4
+ import { useFlow as r } from "../../Flow/useFlow.js";
5
+ import { ensureRequired as n } from "../../../helpers/ensureRequired.js";
6
6
  function f() {
7
- const { companyId: o, onEvent: e } = n();
8
- return /* @__PURE__ */ t(a, { onEvent: e, companyId: r(o) });
7
+ const { companyId: e, onEvent: o } = r();
8
+ return /* @__PURE__ */ t(d, { onEvent: o, companyId: n(e) });
9
9
  }
10
- function s() {
11
- const { companyId: o, payScheduleId: e, defaultValues: m, onEvent: u } = n();
10
+ function S() {
11
+ const { companyId: e, payScheduleId: o, defaultValues: a, disableWorkweekStartDayEditing: m, onEvent: u } = r();
12
12
  return /* @__PURE__ */ t(
13
13
  c,
14
14
  {
15
- companyId: r(o),
16
- payScheduleId: e,
17
- defaultValues: m,
15
+ companyId: n(e),
16
+ payScheduleId: o,
17
+ defaultValues: a,
18
+ disableWorkweekStartDayEditing: m,
18
19
  onEvent: u
19
20
  }
20
21
  );
21
22
  }
22
23
  export {
23
- s as PayScheduleFormContextual,
24
+ S as PayScheduleFormContextual,
24
25
  f as PayScheduleListContextual
25
26
  };
26
27
  //# sourceMappingURL=PayScheduleComponents.js.map
@@ -1 +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\n/** @internal */\nexport interface PayScheduleContextInterface extends FlowContextInterface {\n companyId: string\n payScheduleId?: string\n defaultValues?: PayScheduleDefaultValues\n component: React.ComponentType | null\n}\n\n/** @internal */\nexport function PayScheduleListContextual() {\n const { companyId, onEvent } = useFlow<PayScheduleContextInterface>()\n return <PayScheduleList onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\n/** @internal */\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":";;;;;AAeO,SAASA,IAA4B;AAC1C,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAgB,SAAAF,GAAkB,WAAWG,EAAeJ,CAAS,GAAG;AAClF;AAGO,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;"}
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\n/** @internal */\nexport interface PayScheduleContextInterface extends FlowContextInterface {\n companyId: string\n payScheduleId?: string\n defaultValues?: PayScheduleDefaultValues\n disableWorkweekStartDayEditing?: boolean\n component: React.ComponentType | null\n}\n\n/** @internal */\nexport function PayScheduleListContextual() {\n const { companyId, onEvent } = useFlow<PayScheduleContextInterface>()\n return <PayScheduleList onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\n/** @internal */\nexport function PayScheduleFormContextual() {\n const { companyId, payScheduleId, defaultValues, disableWorkweekStartDayEditing, onEvent } =\n useFlow<PayScheduleContextInterface>()\n\n return (\n <PayScheduleForm\n companyId={ensureRequired(companyId)}\n payScheduleId={payScheduleId}\n defaultValues={defaultValues}\n disableWorkweekStartDayEditing={disableWorkweekStartDayEditing}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["PayScheduleListContextual","companyId","onEvent","useFlow","PayScheduleList","ensureRequired","PayScheduleFormContextual","payScheduleId","defaultValues","disableWorkweekStartDayEditing","jsx","PayScheduleForm"],"mappings":";;;;;AAgBO,SAASA,IAA4B;AAC1C,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAgB,SAAAF,GAAkB,WAAWG,EAAeJ,CAAS,GAAG;AAClF;AAGO,SAASK,IAA4B;AAC1C,QAAM,EAAE,WAAAL,GAAW,eAAAM,GAAe,eAAAC,GAAe,gCAAAC,GAAgC,SAAAP,EAAA,IAC/EC,EAAA;AAEF,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWN,EAAeJ,CAAS;AAAA,MACnC,eAAAM;AAAA,MACA,eAAAC;AAAA,MACA,gCAAAC;AAAA,MACA,SAAAP;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,55 +1,63 @@
1
1
  import { jsx as a, jsxs as c } from "react/jsx-runtime";
2
- import { useState as C } from "react";
3
- import { useTranslation as w } from "react-i18next";
4
- import { usePayScheduleForm as q } from "./shared/usePayScheduleForm/usePayScheduleForm.js";
5
- import y from "./PayScheduleForm.module.scss.js";
6
- import { BaseBoundaries as A, BaseLayout as P } from "../../Base/Base.js";
2
+ import { useState as R } from "react";
3
+ import { useTranslation as C } from "react-i18next";
4
+ import { usePayScheduleForm as O } from "./shared/usePayScheduleForm/usePayScheduleForm.js";
5
+ import m from "./PayScheduleForm.module.scss.js";
6
+ import { BaseBoundaries as M, BaseLayout as f } from "../../Base/Base.js";
7
7
  import "../../Base/useBase.js";
8
- import { SDKFormProvider as M } from "../../../partner-hook-utils/form/SDKFormProvider.js";
9
- import { Form as O } from "../../Common/Form/Form.js";
10
- import { Flex as h } from "../../Common/Flex/Flex.js";
8
+ import { SDKFormProvider as q } from "../../../partner-hook-utils/form/SDKFormProvider.js";
9
+ import { Form as A } from "../../Common/Form/Form.js";
10
+ import { Flex as u } from "../../Common/Flex/Flex.js";
11
11
  import { Grid as L } from "../../Common/Grid/Grid.js";
12
12
  import { ActionsLayout as T } from "../../Common/ActionsLayout/ActionsLayout.js";
13
- import { useComponentContext as x } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import { useDateFormatter as F } from "../../../hooks/useDateFormatter.js";
15
- import { componentEvents as f } from "../../../shared/constants.js";
13
+ import { useComponentContext as F } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import { useDateFormatter as x } from "../../../hooks/useDateFormatter.js";
15
+ import { componentEvents as D } from "../../../shared/constants.js";
16
16
  import { normalizeToDate as N } from "../../../helpers/dateFormatting.js";
17
- const u = (s) => N(s.toString());
18
- function $({ onEvent: s, LoaderComponent: d, ...p }) {
19
- return /* @__PURE__ */ a(A, { componentName: "Company.PayScheduleForm", LoaderComponent: d, children: /* @__PURE__ */ a(I, { onEvent: s, LoaderComponent: d, ...p }) });
17
+ const p = (l) => N(l.toString());
18
+ function ee({ onEvent: l, LoaderComponent: d, ...h }) {
19
+ return /* @__PURE__ */ a(M, { componentName: "Company.PayScheduleForm", LoaderComponent: d, children: /* @__PURE__ */ a(I, { onEvent: l, LoaderComponent: d, ...h }) });
20
20
  }
21
- function I({ onEvent: s, LoaderComponent: d, ...p }) {
22
- const { t: e } = w("Company.PaySchedule"), o = x(), D = F(), i = q(p), [n, v] = C(0);
23
- if (i.isLoading)
21
+ function I({ onEvent: l, LoaderComponent: d, ...h }) {
22
+ const { t: e } = C("Company.PaySchedule"), i = F(), P = x(), o = O(h), [n, w] = R(0);
23
+ if (o.isLoading)
24
24
  return /* @__PURE__ */ a(
25
- P,
25
+ f,
26
26
  {
27
27
  isLoading: !0,
28
- error: i.errorHandling.errors,
28
+ error: o.errorHandling.errors,
29
29
  LoaderComponent: d
30
30
  }
31
31
  );
32
- const g = async () => {
33
- const t = await i.actions.onSubmit();
34
- t && s(
35
- t.mode === "create" ? f.PAY_SCHEDULE_CREATED : f.PAY_SCHEDULE_UPDATED,
32
+ const v = async () => {
33
+ const t = await o.actions.onSubmit();
34
+ t && l(
35
+ t.mode === "create" ? D.PAY_SCHEDULE_CREATED : D.PAY_SCHEDULE_UPDATED,
36
36
  { paySchedule: t.data }
37
37
  );
38
- }, { Fields: r } = i.form, { paymentSpeedDays: b, payPreviewLoading: E } = i.data, l = i.data.payPeriodPreview, S = {
38
+ }, { Fields: r } = o.form, { paymentSpeedDays: S, payPreviewLoading: g } = o.data, s = o.data.payPeriodPreview, b = {
39
39
  "Every week": e("frequencies.everyWeek"),
40
40
  "Every other week": e("frequencies.everyOtherWeek"),
41
41
  "Twice per month": e("frequencies.twicePerMonth"),
42
42
  Monthly: e("frequencies.monthly")
43
- }, R = {
43
+ }, k = {
44
44
  "1st15th": e("frequencyOptions.15thAndLast"),
45
45
  custom: e("frequencyOptions.custom")
46
+ }, E = {
47
+ Sunday: e("workweekStartDayOptions.sunday"),
48
+ Monday: e("workweekStartDayOptions.monday"),
49
+ Tuesday: e("workweekStartDayOptions.tuesday"),
50
+ Wednesday: e("workweekStartDayOptions.wednesday"),
51
+ Thursday: e("workweekStartDayOptions.thursday"),
52
+ Friday: e("workweekStartDayOptions.friday"),
53
+ Saturday: e("workweekStartDayOptions.saturday")
46
54
  };
47
- return /* @__PURE__ */ a(P, { error: i.errorHandling.errors, LoaderComponent: d, children: /* @__PURE__ */ a(M, { formHookResult: i, children: /* @__PURE__ */ a(O, { onSubmit: () => {
48
- g();
49
- }, children: /* @__PURE__ */ c(h, { flexDirection: "column", children: [
50
- /* @__PURE__ */ a(h, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ a("header", { children: /* @__PURE__ */ a(o.Heading, { as: "h2", children: i.status.mode === "create" ? e("headings.addPaySchedule") : e("headings.editPaySchedule") }) }) }),
51
- /* @__PURE__ */ a("div", { className: y.payScheduleContainer, children: /* @__PURE__ */ c(L, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
52
- /* @__PURE__ */ a("div", { className: y.payScheduleForm, children: /* @__PURE__ */ c(h, { flexDirection: "column", children: [
55
+ return /* @__PURE__ */ a(f, { error: o.errorHandling.errors, LoaderComponent: d, children: /* @__PURE__ */ a(q, { formHookResult: o, children: /* @__PURE__ */ a(A, { onSubmit: () => {
56
+ v();
57
+ }, children: /* @__PURE__ */ c(u, { flexDirection: "column", children: [
58
+ /* @__PURE__ */ a(u, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ a("header", { children: /* @__PURE__ */ a(i.Heading, { as: "h2", children: o.status.mode === "create" ? e("headings.addPaySchedule") : e("headings.editPaySchedule") }) }) }),
59
+ /* @__PURE__ */ a("div", { className: m.payScheduleContainer, children: /* @__PURE__ */ c(L, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
60
+ /* @__PURE__ */ a("div", { className: m.payScheduleForm, children: /* @__PURE__ */ c(u, { flexDirection: "column", children: [
53
61
  /* @__PURE__ */ a(
54
62
  r.CustomName,
55
63
  {
@@ -62,7 +70,7 @@ function I({ onEvent: s, LoaderComponent: d, ...p }) {
62
70
  {
63
71
  label: e("labels.frequency"),
64
72
  placeholder: e("labels.frequencyPlaceholder"),
65
- getOptionLabel: (t) => S[t],
73
+ getOptionLabel: (t) => b[t],
66
74
  validationMessages: { REQUIRED: e("validations.frequency") }
67
75
  }
68
76
  ),
@@ -71,7 +79,7 @@ function I({ onEvent: s, LoaderComponent: d, ...p }) {
71
79
  {
72
80
  label: e("labels.frequencyOptions"),
73
81
  description: e("descriptions.frequencyOptionsDescription"),
74
- getOptionLabel: (t) => R[t] ?? t,
82
+ getOptionLabel: (t) => k[t] ?? t,
75
83
  validationMessages: { REQUIRED: e("validations.frequencyOptions") }
76
84
  }
77
85
  ),
@@ -80,7 +88,7 @@ function I({ onEvent: s, LoaderComponent: d, ...p }) {
80
88
  {
81
89
  label: e("labels.firstPayDate"),
82
90
  description: e("descriptions.anchorPayDateDescription", {
83
- count: b
91
+ count: S
84
92
  }),
85
93
  validationMessages: { REQUIRED: e("validations.firstPayDate") },
86
94
  minDate: /* @__PURE__ */ new Date()
@@ -113,46 +121,55 @@ function I({ onEvent: s, LoaderComponent: d, ...p }) {
113
121
  DAY_RANGE: e("validations.dayRange")
114
122
  }
115
123
  }
124
+ ),
125
+ r.WorkweekStartDay && /* @__PURE__ */ a(
126
+ r.WorkweekStartDay,
127
+ {
128
+ label: e("labels.workweekStartDay"),
129
+ placeholder: e("labels.workweekStartDayPlaceholder"),
130
+ description: e("descriptions.workweekStartDayDescription"),
131
+ getOptionLabel: (t) => E[t]
132
+ }
116
133
  )
117
134
  ] }) }),
118
- /* @__PURE__ */ a(h, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: l && l[n] ? /* @__PURE__ */ c("div", { className: y.calendarContainer, children: [
119
- !E && /* @__PURE__ */ a(
120
- o.Select,
135
+ /* @__PURE__ */ a(u, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: s && s[n] ? /* @__PURE__ */ c("div", { className: m.calendarContainer, children: [
136
+ !g && /* @__PURE__ */ a(
137
+ i.Select,
121
138
  {
122
139
  label: e("labels.preview"),
123
140
  placeholder: "",
124
141
  isRequired: !0,
125
- options: l.map((t, m) => ({
126
- value: String(m),
127
- label: D.formatPayPeriodRange(
142
+ options: s.map((t, y) => ({
143
+ value: String(y),
144
+ label: P.formatPayPeriodRange(
128
145
  t.startDate.toString(),
129
146
  t.endDate.toString()
130
147
  )
131
148
  })),
132
149
  value: String(n),
133
150
  onChange: (t) => {
134
- const m = Number(t);
135
- isNaN(m) || v(m);
151
+ const y = Number(t);
152
+ isNaN(y) || w(y);
136
153
  }
137
154
  }
138
155
  ),
139
156
  /* @__PURE__ */ a(
140
- o.CalendarPreview,
157
+ i.CalendarPreview,
141
158
  {
142
159
  dateRange: {
143
- start: u(l[n].startDate),
144
- end: u(l[n].endDate),
160
+ start: p(s[n].startDate),
161
+ end: p(s[n].endDate),
145
162
  label: e("payPreview.payPeriod") || "Pay Period"
146
163
  },
147
164
  highlightDates: [
148
165
  {
149
- date: u(l[n].checkDate),
166
+ date: p(s[n].checkDate),
150
167
  highlightColor: "primary",
151
168
  label: e("payPreview.payday") || "Payday"
152
169
  },
153
170
  {
154
- date: u(
155
- l[n].runPayrollBy
171
+ date: p(
172
+ s[n].runPayrollBy
156
173
  ),
157
174
  highlightColor: "secondary",
158
175
  label: e("payPreview.payrollDeadline") || "Payroll Deadline"
@@ -161,12 +178,12 @@ function I({ onEvent: s, LoaderComponent: d, ...p }) {
161
178
  },
162
179
  n
163
180
  )
164
- ] }) : /* @__PURE__ */ a("div", { className: y.calendarContainer, children: /* @__PURE__ */ a(
165
- o.Alert,
181
+ ] }) : /* @__PURE__ */ a("div", { className: m.calendarContainer, children: /* @__PURE__ */ a(
182
+ i.Alert,
166
183
  {
167
184
  status: "info",
168
185
  label: e("previewAlert.title", "Pay Schedule Preview"),
169
- children: /* @__PURE__ */ a(o.Text, { children: e(
186
+ children: /* @__PURE__ */ a(i.Text, { children: e(
170
187
  "previewAlert.description",
171
188
  "Complete all the required fields on the left to see a preview of your pay schedule."
172
189
  ) })
@@ -175,20 +192,20 @@ function I({ onEvent: s, LoaderComponent: d, ...p }) {
175
192
  ] }) }),
176
193
  /* @__PURE__ */ c(T, { children: [
177
194
  /* @__PURE__ */ a(
178
- o.Button,
195
+ i.Button,
179
196
  {
180
197
  variant: "secondary",
181
198
  onClick: () => {
182
- s(f.CANCEL);
199
+ l(D.CANCEL);
183
200
  },
184
201
  children: e("actions.cancel")
185
202
  }
186
203
  ),
187
- /* @__PURE__ */ a(o.Button, { type: "submit", isLoading: i.status.isPending, children: e("actions.save") })
204
+ /* @__PURE__ */ a(i.Button, { type: "submit", isLoading: o.status.isPending, children: e("actions.save") })
188
205
  ] })
189
206
  ] }) }) }) });
190
207
  }
191
208
  export {
192
- $ as PayScheduleForm
209
+ ee as PayScheduleForm
193
210
  };
194
211
  //# sourceMappingURL=PayScheduleForm.js.map