@gusto/embedded-react-sdk 0.52.2 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +1 -2
  3. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +42 -43
  4. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
  5. package/dist/components/Common/Fields/PercentageField/PercentageField.js +44 -42
  6. package/dist/components/Common/Fields/PercentageField/PercentageField.js.map +1 -1
  7. package/dist/components/Common/UI/Box/Box.js +6 -6
  8. package/dist/components/Common/UI/Box/Box.js.map +1 -1
  9. package/dist/components/Common/UI/Box/Box.module.scss.js +8 -8
  10. package/dist/components/Common/UI/Box/BoxTypes.d.ts +1 -1
  11. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  12. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +16 -14
  13. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js.map +1 -1
  14. package/dist/components/Common/UI/Dialog/Dialog.js +29 -28
  15. package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
  16. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  17. package/dist/components/Common/UI/FormBox/FormBox.d.ts +1 -1
  18. package/dist/components/Common/UI/FormBox/FormBox.js +9 -8
  19. package/dist/components/Common/UI/FormBox/FormBox.js.map +1 -1
  20. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js +8 -6
  21. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js.map +1 -1
  22. package/dist/components/Common/UI/FormBox/FormBoxTypes.d.ts +5 -1
  23. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  24. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -10
  25. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  27. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  29. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +18 -21
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -12
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  35. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/Head.js +8 -9
  37. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  38. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  39. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
  41. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  42. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +20 -21
  43. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  45. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  46. package/dist/components/Company/AssignSignatory/TitleSelect.js +10 -12
  47. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  48. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  49. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  50. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  51. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  52. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  53. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountForm/Head.js +2 -3
  55. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  57. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  59. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  60. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  61. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  62. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  63. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  64. package/dist/components/Company/BankAccount/stateMachine.d.ts +0 -1
  65. package/dist/components/Company/BankAccount/stateMachine.js +33 -35
  66. package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
  67. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  68. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  69. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -14
  70. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  71. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  72. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  73. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
  74. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  76. package/dist/components/Company/DocumentSigner/stateMachine.d.ts +0 -1
  77. package/dist/components/Company/DocumentSigner/stateMachine.js +27 -29
  78. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
  79. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  80. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  81. package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -10
  82. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  83. package/dist/components/Company/FederalTaxes/Form.js +4 -4
  84. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -9
  85. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  86. package/dist/components/Company/Industry/Actions.js +5 -6
  87. package/dist/components/Company/Industry/Actions.js.map +1 -1
  88. package/dist/components/Company/Industry/Context.js +8 -7
  89. package/dist/components/Company/Industry/Context.js.map +1 -1
  90. package/dist/components/Company/Industry/Edit.js +10 -12
  91. package/dist/components/Company/Industry/Edit.js.map +1 -1
  92. package/dist/components/Company/Industry/IndustrySelect.js +6 -8
  93. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  94. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  95. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  96. package/dist/components/Company/Locations/LocationForm/Form.js +4 -6
  97. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  98. package/dist/components/Company/Locations/LocationForm/LocationForm.js +11 -14
  99. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  100. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  101. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  102. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  103. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -12
  105. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  107. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  108. package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
  109. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  110. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -10
  111. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  112. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -5
  113. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  114. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  115. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  116. package/dist/components/Company/PaySchedule/PayScheduleForm.js +47 -51
  117. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  118. package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +0 -1
  119. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +26 -28
  120. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
  121. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  122. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +2 -1
  123. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  124. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +2 -0
  125. package/dist/components/Company/StateTaxes/StateTaxesComponents.js +29 -16
  126. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  127. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  128. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  129. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +1 -1
  130. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +21 -32
  131. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  132. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +67 -75
  133. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  134. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  135. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  136. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  137. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  138. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +62 -47
  139. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +1 -0
  141. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +26 -23
  142. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  143. package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +1 -0
  144. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  145. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  146. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.d.ts +12 -0
  147. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.js +36 -0
  148. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.js.map +1 -0
  149. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.d.ts +10 -0
  150. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js +110 -0
  151. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js.map +1 -0
  152. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.d.ts +18 -0
  153. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js +55 -0
  154. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js.map +1 -0
  155. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.d.ts +47 -0
  156. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.js +108 -0
  157. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.js.map +1 -0
  158. package/dist/components/Company/StateTaxes/TaxRateManagement/context.d.ts +25 -0
  159. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +22 -0
  160. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -0
  161. package/dist/components/Company/StateTaxes/TaxRateManagement/index.d.ts +1 -0
  162. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.d.ts +29 -0
  163. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js +34 -0
  164. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js.map +1 -0
  165. package/dist/components/Company/StateTaxes/shared/RequirementFields.d.ts +17 -0
  166. package/dist/components/Company/StateTaxes/shared/RequirementFields.js +24 -0
  167. package/dist/components/Company/StateTaxes/shared/RequirementFields.js.map +1 -0
  168. package/dist/components/Company/StateTaxes/{StateTaxesForm → shared}/applicableIf.d.ts +1 -1
  169. package/dist/components/Company/StateTaxes/shared/applicableIf.js.map +1 -0
  170. package/dist/components/Company/StateTaxes/shared/applicableIf.test.d.ts +1 -0
  171. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.d.ts +19 -0
  172. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.js +38 -0
  173. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.js.map +1 -0
  174. package/dist/components/Company/StateTaxes/shared/requirementValue.d.ts +2 -0
  175. package/dist/components/Company/StateTaxes/shared/requirementValue.js +7 -0
  176. package/dist/components/Company/StateTaxes/shared/requirementValue.js.map +1 -0
  177. package/dist/components/Company/StateTaxes/shared/rhfKey.d.ts +23 -0
  178. package/dist/components/Company/StateTaxes/shared/rhfKey.js +13 -0
  179. package/dist/components/Company/StateTaxes/shared/rhfKey.js.map +1 -0
  180. package/dist/components/Company/StateTaxes/shared/rhfKey.test.d.ts +1 -0
  181. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +1 -0
  182. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +33 -11
  183. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  184. package/dist/components/Company/exports/companyOnboarding.d.ts +1 -0
  185. package/dist/components/Company/exports/companyOnboarding.js +12 -10
  186. package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
  187. package/dist/components/Contractor/Address/Address.js +11 -12
  188. package/dist/components/Contractor/Address/Address.js.map +1 -1
  189. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.d.ts +39 -0
  190. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js +90 -0
  191. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js.map +1 -0
  192. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.d.ts +22 -0
  193. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +247 -0
  194. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -0
  195. package/dist/components/Contractor/ContractorList/{index.d.ts → onboarding/ContractorList.d.ts} +3 -3
  196. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js +51 -0
  197. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js.map +1 -0
  198. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.d.ts +16 -0
  199. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js +113 -0
  200. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js.map +1 -0
  201. package/dist/components/Contractor/ContractorList/shared/index.d.ts +1 -0
  202. package/dist/components/Contractor/ContractorList/shared/useContractorList.d.ts +87 -0
  203. package/dist/components/Contractor/ContractorList/shared/useContractorList.js +110 -0
  204. package/dist/components/Contractor/ContractorList/shared/useContractorList.js.map +1 -0
  205. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.d.ts +0 -1
  206. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js +18 -20
  207. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js.map +1 -1
  208. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +2 -3
  209. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -1
  210. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +1 -1
  211. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js +8 -8
  212. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +1 -1
  213. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  214. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +9 -10
  215. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -1
  216. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  217. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  218. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +1 -1
  219. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +162 -251
  220. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  221. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +2 -1
  222. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js +2 -2
  223. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +1 -1
  224. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +45 -44
  225. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  226. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +2 -3
  227. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  228. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -3
  229. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  230. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.d.ts +32 -0
  231. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js +107 -0
  232. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js.map +1 -0
  233. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.test.d.ts +1 -0
  234. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +6 -7
  235. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -1
  236. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +18 -19
  237. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -1
  238. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
  239. package/dist/components/Contractor/Submit/Submit.js +2 -3
  240. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  241. package/dist/components/Contractor/exports/contractorManagement.d.ts +1 -0
  242. package/dist/components/Contractor/exports/contractorManagement.js +12 -10
  243. package/dist/components/Contractor/exports/contractorManagement.js.map +1 -1
  244. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +1 -1
  245. package/dist/components/Contractor/exports/contractorOnboarding.js +1 -1
  246. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +32 -33
  247. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  248. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +2 -3
  249. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
  250. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  251. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  252. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js +6 -7
  253. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
  254. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js +14 -15
  255. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js.map +1 -1
  256. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  257. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  258. package/dist/components/Employee/Documents/management/DocumentManager.js +6 -7
  259. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  260. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +6 -7
  261. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
  262. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js +4 -5
  263. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -1
  264. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +10 -13
  265. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  266. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js +5 -6
  267. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -1
  268. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.module.scss.js +8 -0
  269. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.module.scss.js.map +1 -0
  270. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  271. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  272. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +22 -21
  273. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  274. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +6 -6
  275. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +5 -4
  276. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
  277. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +3 -4
  278. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  279. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -7
  280. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  281. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js +11 -12
  282. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
  283. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  284. package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.js +15 -16
  285. package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.js.map +1 -1
  286. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +6 -7
  287. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
  288. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +11 -12
  289. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
  290. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  291. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  292. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js +7 -8
  293. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js.map +1 -1
  294. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +4 -4
  295. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +29 -23
  296. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js.map +1 -1
  297. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +26 -20
  298. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
  299. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +133 -99
  300. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -1
  301. package/dist/components/Employee/PaymentMethod/onboarding/ListView.module.scss.js +8 -0
  302. package/dist/components/Employee/PaymentMethod/onboarding/ListView.module.scss.js.map +1 -0
  303. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +1 -1
  304. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +19 -20
  305. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
  306. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js +92 -86
  307. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js.map +1 -1
  308. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  309. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  310. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +65 -64
  311. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
  312. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +7 -8
  313. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
  314. package/dist/components/Employee/Profile/management/ProfileEditForm.js +7 -7
  315. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +6 -6
  316. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +6 -6
  317. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  318. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  319. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  320. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js +11 -12
  321. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
  322. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +9 -10
  323. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
  324. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +6 -7
  325. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
  326. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  327. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +44 -45
  328. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
  329. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +23 -22
  330. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  331. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +27 -27
  332. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  333. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +9 -10
  334. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  335. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +2 -3
  336. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  337. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js +16 -17
  338. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js.map +1 -1
  339. package/dist/components/Flow/Flow.js +1 -1
  340. package/dist/components/Flow/FlowHeader.js +3 -4
  341. package/dist/components/Flow/FlowHeader.js.map +1 -1
  342. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +8 -9
  343. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  344. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +7 -8
  345. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  346. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +37 -37
  347. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  348. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -9
  349. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  350. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +7 -8
  351. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  352. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +10 -12
  353. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  354. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +0 -1
  355. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  356. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -8
  357. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  358. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +3 -3
  359. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +54 -50
  360. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  361. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +80 -69
  362. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  363. package/dist/components/Payroll/PayrollList/PayrollList.js +20 -18
  364. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  365. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +138 -136
  366. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  367. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +10 -12
  368. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  369. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +4 -4
  370. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -3
  371. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  372. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -3
  373. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  374. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +1 -2
  375. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  376. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -3
  377. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  378. package/dist/components/Payroll/usePreparedPayrollData.js +4 -3
  379. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  380. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +2 -3
  381. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  382. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +4 -4
  383. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +4 -4
  384. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +34 -36
  385. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  386. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +4 -4
  387. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +24 -25
  388. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  389. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -0
  390. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +29 -28
  391. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  392. package/dist/contexts/LocaleProvider/useLocale.d.ts +1 -9
  393. package/dist/contexts/LocaleProvider/useLocale.js +5 -15
  394. package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
  395. package/dist/contexts/NonceProvider/index.d.ts +1 -0
  396. package/dist/contexts/NonceProvider/useNonce.d.ts +37 -0
  397. package/dist/contexts/NonceProvider/useNonce.js +7 -0
  398. package/dist/contexts/NonceProvider/useNonce.js.map +1 -0
  399. package/dist/contexts/ThemeProvider/ThemeProvider.js +25 -24
  400. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  401. package/dist/contexts/index.d.ts +1 -0
  402. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +12 -7
  403. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +25 -21
  404. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -1
  405. package/dist/i18n/I18n.js +1 -0
  406. package/dist/i18n/I18n.js.map +1 -1
  407. package/dist/i18n/en/Company.StateTaxes.json.js +6 -4
  408. package/dist/i18n/en/Company.StateTaxes.json.js.map +1 -1
  409. package/dist/i18n/en/Contractor.ContractorList.json.js +14 -12
  410. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  411. package/dist/i18n/en/Contractor.ManagementContractorList.json.js +60 -0
  412. package/dist/i18n/en/Contractor.ManagementContractorList.json.js.map +1 -0
  413. package/dist/i18n/en/Employee.Management.PaymentMethodBankForm.json.js +18 -16
  414. package/dist/i18n/en/Employee.Management.PaymentMethodBankForm.json.js.map +1 -1
  415. package/dist/i18n/en/Employee.Management.PaymentMethodSplitForm.json.js +2 -2
  416. package/dist/i18n/en/Employee.PaymentMethod.json.js +74 -72
  417. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  418. package/dist/i18n/en/Employee.SplitPaymentsFormBody.json.js +2 -2
  419. package/dist/i18n/en/Payroll.PayrollHistory.json.js +8 -8
  420. package/dist/i18n/en/Payroll.PayrollList.json.js +23 -23
  421. package/dist/i18n/types.d.ts +193 -11
  422. package/dist/index.js +15 -13
  423. package/dist/index.js.map +1 -1
  424. package/dist/models/external.d.ts +4 -0
  425. package/dist/partner-hook-utils/form/SDKFormProvider.js +39 -24
  426. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
  427. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +12 -15
  428. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  429. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +16 -19
  430. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  431. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +13 -16
  432. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  433. package/dist/partner-hook-utils/form/fields/SelectHookField.js +12 -15
  434. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  435. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +18 -21
  436. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  437. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +9 -12
  438. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  439. package/dist/partner-hook-utils/form/preprocessors.d.ts +2 -2
  440. package/dist/partner-hook-utils/form/preprocessors.js +8 -7
  441. package/dist/partner-hook-utils/form/preprocessors.js.map +1 -1
  442. package/dist/partner-hook-utils/form/preprocessors.test.d.ts +1 -0
  443. package/dist/shared/constants.d.ts +12 -0
  444. package/dist/shared/constants.js +23 -17
  445. package/dist/shared/constants.js.map +1 -1
  446. package/dist/style.css +1 -1
  447. package/docs/guides/endpoint-inventory.json +61 -0
  448. package/package.json +16 -14
  449. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +0 -1
  450. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +0 -4
  451. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +0 -5
  452. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +0 -1
  453. package/dist/components/Contractor/ContractorList/index.js +0 -141
  454. package/dist/components/Contractor/ContractorList/index.js.map +0 -1
  455. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +0 -18
  456. package/dist/components/Contractor/ContractorList/useContractorList.js +0 -15
  457. package/dist/components/Contractor/ContractorList/useContractorList.js.map +0 -1
  458. /package/dist/components/Company/StateTaxes/{StateTaxesForm/applicableIf.test.d.ts → TaxRateManagement/toHistoryRows.test.d.ts} +0 -0
  459. /package/dist/components/Company/StateTaxes/{StateTaxesForm → shared}/applicableIf.js +0 -0
@@ -6,8 +6,8 @@ import { PayrollOverviewStatus as p } from "./PayrollOverviewTypes.js";
6
6
  import ne from "./PayrollOverviewPresentation.module.scss.js";
7
7
  import { Flex as s } from "../../Common/Flex/Flex.js";
8
8
  import { Grid as we } from "../../Common/Grid/Grid.js";
9
- import { useComponentContext as _e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import ve from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
9
+ import _e from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
10
+ import { useComponentContext as ve } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
11
  import { useI18n as Le } from "../../../i18n/I18n.js";
12
12
  import { useDateFormatter as Ee } from "../../../hooks/useDateFormatter.js";
13
13
  import Oe from "../../../hooks/useNumberFormatter.js";
@@ -39,9 +39,9 @@ const Ve = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
39
39
  paymentSpeed: be,
40
40
  pagination: _
41
41
  }) => {
42
- const { Alert: v, Badge: L, Button: T, ButtonIcon: R, Dialog: ye, Heading: j, Text: y, Tabs: pe } = _e();
42
+ const { Alert: v, Badge: L, Button: T, ButtonIcon: R, Dialog: ye, Heading: j, Text: y, Tabs: pe } = ve();
43
43
  Le("Payroll.PayrollOverview");
44
- const d = Ee(), { t } = Pe("Payroll.PayrollOverview"), l = Oe("currency"), [fe, he] = re("companyPays"), [U, G] = re(!1), E = ke(null), D = ve({ ref: E }).includes("small"), H = f === p.Submitting || f === p.Cancelling, $ = /* @__PURE__ */ a(j, { as: "h1", children: t(h ? "summaryTitle" : "overviewTitle") }), z = Ne(n.offCycleReason), K = /* @__PURE__ */ a(y, { children: /* @__PURE__ */ a(
44
+ const d = Ee(), { t } = Pe("Payroll.PayrollOverview"), l = Oe("currency"), [fe, he] = re("companyPays"), [U, G] = re(!1), E = ke(null), D = _e({ ref: E }).includes("small"), H = f === p.Submitting || f === p.Cancelling, $ = /* @__PURE__ */ a(j, { as: "h1", children: t(h ? "summaryTitle" : "overviewTitle") }), z = Ne(n.offCycleReason), K = /* @__PURE__ */ a(y, { children: /* @__PURE__ */ a(
45
45
  xe,
46
46
  {
47
47
  i18nKey: z ? "pageSubtitleDismissal" : "pageSubtitle",
@@ -2,10 +2,9 @@ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
2
  import { useTranslation as B } from "react-i18next";
3
3
  import { Flex as l } from "../../../Common/Flex/Flex.js";
4
4
  import { useComponentContext as _ } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
5
- import "react";
6
5
  import { useDateFormatter as y } from "../../../../hooks/useDateFormatter.js";
7
6
  import O from "../../../../assets/icons/icon-zap-fast.svg.js";
8
- const L = ({
7
+ const v = ({
9
8
  blocker: r,
10
9
  selectedValue: d,
11
10
  onUnblockOptionChange: h,
@@ -46,6 +45,6 @@ const L = ({
46
45
  ] }) });
47
46
  };
48
47
  export {
49
- L as FastAchSubmissionBlockerBanner
48
+ v as FastAchSubmissionBlockerBanner
50
49
  };
51
50
  //# sourceMappingURL=FastAchSubmissionBlockerBanner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FastAchSubmissionBlockerBanner.js","sources":["../../../../../src/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type {\n PayrollSubmissionBlockerType,\n UnblockOptions,\n} from '@gusto/embedded-api/models/components/payrollsubmissionblockertype'\nimport type { PaymentSpeed } from '@gusto/embedded-api/models/components/paymentconfigs'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport IconFast from '@/assets/icons/icon-zap-fast.svg?react'\n\ntype FastAchBlockerType = 'fast_ach_threshold_exceeded' | 'needs_earned_access_for_fast_ach'\n\ninterface FastAchSubmissionBlockerBannerProps {\n blocker: PayrollSubmissionBlockerType\n selectedValue?: string\n onUnblockOptionChange: (blockerType: string, value: string) => void\n paymentSpeed?: PaymentSpeed\n}\n\n/** @internal */\nexport const FastAchSubmissionBlockerBanner = ({\n blocker,\n selectedValue,\n onUnblockOptionChange,\n paymentSpeed,\n}: FastAchSubmissionBlockerBannerProps) => {\n const { t } = useTranslation('Payroll.PayrollOverview')\n const { Banner, Text, RadioGroup, Badge } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const blockerType = (blocker.blockerType || 'fast_ach_threshold_exceeded') as FastAchBlockerType\n\n const titleKey =\n blockerType === 'fast_ach_threshold_exceeded'\n ? 'submissionBlockers.fast_ach_threshold_exceeded.title'\n : 'submissionBlockers.needs_earned_access_for_fast_ach.title'\n\n return (\n <Banner status=\"error\" title={t(titleKey, { days: paymentSpeed || '2-day' })}>\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('submissionBlockers.fastAchOptions.description')}</Text>\n <RadioGroup\n label={t('submissionBlockers.fastAchOptions.fundingOptionsLabel')}\n shouldVisuallyHideLabel\n options={\n blocker.unblockOptions?.map((option: UnblockOptions) => {\n const isWire = option.unblockType === 'wire_in'\n const label = isWire\n ? t('submissionBlockers.fastAchOptions.wireLabel')\n : t('submissionBlockers.fastAchOptions.directDepositLabel')\n const description = isWire\n ? t('submissionBlockers.fastAchOptions.wireDescription')\n : t('submissionBlockers.fastAchOptions.directDepositDescription')\n\n return {\n value: option.unblockType || '',\n label: (\n <Flex alignItems=\"center\" gap={8}>\n <Text weight=\"semibold\">{label}</Text>\n {isWire && (\n <Badge status=\"success\">\n <IconFast aria-hidden />{' '}\n {t('submissionBlockers.fastAchOptions.wireFastestBadge')}\n </Badge>\n )}\n {option.checkDate && (\n <Badge status=\"info\">\n {t('submissionBlockers.fastAchOptions.employeePayDate', {\n date: dateFormatter.formatShortWithYear(option.checkDate),\n })}\n </Badge>\n )}\n </Flex>\n ),\n description,\n }\n }) || []\n }\n value={selectedValue}\n onChange={value => {\n onUnblockOptionChange(blockerType, value)\n }}\n />\n </Flex>\n </Banner>\n )\n}\n"],"names":["FastAchSubmissionBlockerBanner","blocker","selectedValue","onUnblockOptionChange","paymentSpeed","t","useTranslation","Banner","Text","RadioGroup","Badge","useComponentContext","dateFormatter","useDateFormatter","blockerType","jsxs","Flex","jsx","option","isWire","label","description","IconFast","value"],"mappings":";;;;;;;AAqBO,MAAMA,IAAiC,CAAC;AAAA,EAC7C,SAAAC;AAAA,EACA,eAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,cAAAC;AACF,MAA2C;AACzC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,QAAAC,GAAQ,MAAAC,GAAM,YAAAC,GAAY,OAAAC,EAAA,IAAUC,EAAA,GACtCC,IAAgBC,EAAA,GAChBC,IAAeb,EAAQ,eAAe;AAO5C,2BACGM,GAAA,EAAO,QAAO,SAAQ,OAAOF,EAL9BS,MAAgB,gCACZ,yDACA,6DAGsC,EAAE,MAAMV,KAAgB,SAAS,GAC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view/SubmissionBlockers/FastAchSubmissionBlockerBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type {\n PayrollSubmissionBlockerType,\n UnblockOptions,\n} from '@gusto/embedded-api/models/components/payrollsubmissionblockertype'\nimport type { PaymentSpeed } from '@gusto/embedded-api/models/components/paymentconfigs'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport IconFast from '@/assets/icons/icon-zap-fast.svg?react'\n\ntype FastAchBlockerType = 'fast_ach_threshold_exceeded' | 'needs_earned_access_for_fast_ach'\n\ninterface FastAchSubmissionBlockerBannerProps {\n blocker: PayrollSubmissionBlockerType\n selectedValue?: string\n onUnblockOptionChange: (blockerType: string, value: string) => void\n paymentSpeed?: PaymentSpeed\n}\n\n/** @internal */\nexport const FastAchSubmissionBlockerBanner = ({\n blocker,\n selectedValue,\n onUnblockOptionChange,\n paymentSpeed,\n}: FastAchSubmissionBlockerBannerProps) => {\n const { t } = useTranslation('Payroll.PayrollOverview')\n const { Banner, Text, RadioGroup, Badge } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const blockerType = (blocker.blockerType || 'fast_ach_threshold_exceeded') as FastAchBlockerType\n\n const titleKey =\n blockerType === 'fast_ach_threshold_exceeded'\n ? 'submissionBlockers.fast_ach_threshold_exceeded.title'\n : 'submissionBlockers.needs_earned_access_for_fast_ach.title'\n\n return (\n <Banner status=\"error\" title={t(titleKey, { days: paymentSpeed || '2-day' })}>\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('submissionBlockers.fastAchOptions.description')}</Text>\n <RadioGroup\n label={t('submissionBlockers.fastAchOptions.fundingOptionsLabel')}\n shouldVisuallyHideLabel\n options={\n blocker.unblockOptions?.map((option: UnblockOptions) => {\n const isWire = option.unblockType === 'wire_in'\n const label = isWire\n ? t('submissionBlockers.fastAchOptions.wireLabel')\n : t('submissionBlockers.fastAchOptions.directDepositLabel')\n const description = isWire\n ? t('submissionBlockers.fastAchOptions.wireDescription')\n : t('submissionBlockers.fastAchOptions.directDepositDescription')\n\n return {\n value: option.unblockType || '',\n label: (\n <Flex alignItems=\"center\" gap={8}>\n <Text weight=\"semibold\">{label}</Text>\n {isWire && (\n <Badge status=\"success\">\n <IconFast aria-hidden />{' '}\n {t('submissionBlockers.fastAchOptions.wireFastestBadge')}\n </Badge>\n )}\n {option.checkDate && (\n <Badge status=\"info\">\n {t('submissionBlockers.fastAchOptions.employeePayDate', {\n date: dateFormatter.formatShortWithYear(option.checkDate),\n })}\n </Badge>\n )}\n </Flex>\n ),\n description,\n }\n }) || []\n }\n value={selectedValue}\n onChange={value => {\n onUnblockOptionChange(blockerType, value)\n }}\n />\n </Flex>\n </Banner>\n )\n}\n"],"names":["FastAchSubmissionBlockerBanner","blocker","selectedValue","onUnblockOptionChange","paymentSpeed","t","useTranslation","Banner","Text","RadioGroup","Badge","useComponentContext","dateFormatter","useDateFormatter","blockerType","jsxs","Flex","jsx","option","isWire","label","description","IconFast","value"],"mappings":";;;;;;AAqBO,MAAMA,IAAiC,CAAC;AAAA,EAC7C,SAAAC;AAAA,EACA,eAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,cAAAC;AACF,MAA2C;AACzC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,QAAAC,GAAQ,MAAAC,GAAM,YAAAC,GAAY,OAAAC,EAAA,IAAUC,EAAA,GACtCC,IAAgBC,EAAA,GAChBC,IAAeb,EAAQ,eAAe;AAO5C,2BACGM,GAAA,EAAO,QAAO,SAAQ,OAAOF,EAL9BS,MAAgB,gCACZ,yDACA,6DAGsC,EAAE,MAAMV,KAAgB,SAAS,GACzE,UAAA,gBAAAW,EAACC,KAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC,EAACT,GAAA,EAAM,UAAAH,EAAE,+CAA+C,EAAA,CAAE;AAAA,IAC1D,gBAAAY;AAAA,MAACR;AAAA,MAAA;AAAA,QACC,OAAOJ,EAAE,uDAAuD;AAAA,QAChE,yBAAuB;AAAA,QACvB,SACEJ,EAAQ,gBAAgB,IAAI,CAACiB,MAA2B;AACtD,gBAAMC,IAASD,EAAO,gBAAgB,WAChCE,IACFf,EADUc,IACR,gDACA,sDAD6C,GAE7CE,IACFhB,EADgBc,IACd,sDACA,4DADmD;AAGzD,iBAAO;AAAA,YACL,OAAOD,EAAO,eAAe;AAAA,YAC7B,OACE,gBAAAH,EAACC,GAAA,EAAK,YAAW,UAAS,KAAK,GAC7B,UAAA;AAAA,cAAA,gBAAAC,EAACT,GAAA,EAAK,QAAO,YAAY,UAAAY,GAAM;AAAA,cAC9BD,KACC,gBAAAJ,EAACL,GAAA,EAAM,QAAO,WACZ,UAAA;AAAA,gBAAA,gBAAAO,EAACK,GAAA,EAAS,eAAW,GAAA,CAAC;AAAA,gBAAG;AAAA,gBACxBjB,EAAE,oDAAoD;AAAA,cAAA,GACzD;AAAA,cAEDa,EAAO,aACN,gBAAAD,EAACP,KAAM,QAAO,QACX,YAAE,qDAAqD;AAAA,gBACtD,MAAME,EAAc,oBAAoBM,EAAO,SAAS;AAAA,cAAA,CACzD,EAAA,CACH;AAAA,YAAA,GAEJ;AAAA,YAEF,aAAAG;AAAA,UAAA;AAAA,QAEJ,CAAC,KAAK,CAAA;AAAA,QAER,OAAOnB;AAAA,QACP,UAAU,CAAAqB,MAAS;AACjB,UAAApB,EAAsBW,GAAaS,CAAK;AAAA,QAC1C;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -11,10 +11,9 @@ import { DataView as L } from "../../../Common/DataView/DataView.js";
11
11
  import { useDataView as D } from "../../../Common/DataView/useDataView.js";
12
12
  import { FlexItem as E, Flex as d } from "../../../Common/Flex/Flex.js";
13
13
  import { EmptyData as x } from "../../../Common/EmptyData/EmptyData.js";
14
- import "react";
15
14
  import { recoveryCasesEvents as P } from "../../../../shared/constants.js";
16
15
  import { formatNumberAsCurrency as p } from "../../../../helpers/formattedStrings.js";
17
- function J(r) {
16
+ function z(r) {
18
17
  return /* @__PURE__ */ e(R, { ...r, children: /* @__PURE__ */ e(w, { ...r, children: r.children }) });
19
18
  }
20
19
  function A(r) {
@@ -100,6 +99,6 @@ function w({ companyId: r, dictionary: n, onEvent: s }) {
100
99
  ] }) });
101
100
  }
102
101
  export {
103
- J as RecoveryCasesList
102
+ z as RecoveryCasesList
104
103
  };
105
104
  //# sourceMappingURL=RecoveryCasesList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecoveryCasesList.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type {\n RecoveryCase,\n RecoveryCaseStatus,\n} from '@gusto/embedded-api/models/components/recoverycase'\nimport { useRecoveryCasesGetSuspense } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport styles from './RecoveryCasesList.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { EmptyData, Flex, FlexItem } from '@/components/Common'\nimport { recoveryCasesEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\n\ninterface RecoveryCasesListProps extends BaseComponentInterface<'Payroll.RecoveryCasesList'> {\n companyId: string\n}\n\n/** @internal */\nexport function RecoveryCasesList(props: RecoveryCasesListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction getStatusBadgeStatus(status: RecoveryCaseStatus | undefined): BadgeProps['status'] {\n if (status === 'open') {\n return 'info'\n }\n return 'warning'\n}\n\nfunction ErrorCodeCell({ errorCode }: { errorCode: string | null | undefined }) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Text } = useComponentContext()\n const { title, subtitle } = useRecoveryCaseErrorCode(errorCode)\n\n if (!title && !subtitle) {\n return (\n <span aria-label={t('labels.noLatestErrorCodeAriaLabel')} aria-live=\"polite\">\n {t('labels.noLatestErrorCode')}\n </span>\n )\n }\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n {title && <Text weight=\"semibold\">{title}</Text>}\n {subtitle && <Text>{subtitle}</Text>}\n </Flex>\n )\n}\n\nfunction StatusCell({ status }: { status: RecoveryCaseStatus | undefined }) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Badge } = useComponentContext()\n\n if (!status) {\n return null\n }\n\n const badgeStatus = getStatusBadgeStatus(status)\n const statusLabel = t(`status.${status}`)\n\n return <Badge status={badgeStatus}>{statusLabel}</Badge>\n}\n\nfunction ResolveButton({\n recoveryCase,\n onEvent,\n}: {\n recoveryCase: RecoveryCase\n onEvent: BaseComponentInterface['onEvent']\n}) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Button } = useComponentContext()\n\n if (recoveryCase.status !== 'open') {\n return null\n }\n\n return (\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESOLVE, {\n recoveryCaseId: recoveryCase.uuid,\n })\n }}\n >\n {t('cta.resolve')}\n </Button>\n )\n}\n\nfunction Root({ companyId, dictionary, onEvent }: RecoveryCasesListProps) {\n useComponentDictionary('Payroll.RecoveryCasesList', dictionary)\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Heading, Text } = useComponentContext()\n\n const { data } = useRecoveryCasesGetSuspense({\n companyUuid: companyId,\n })\n\n const recoveryCases = (data.recoveryCases ?? []).filter(rc => rc.status !== 'recovered')\n\n const dataViewProps = useDataView({\n data: recoveryCases,\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n columns: [\n {\n key: 'originalDebitDate',\n title: t('columns.originalDebitDate'),\n render: recoveryCase => (\n <FlexItem flexGrow={1}>\n <Text>{recoveryCase.originalDebitDate ?? '-'}</Text>\n </FlexItem>\n ),\n },\n {\n key: 'totalAmount',\n title: t('columns.totalAmount'),\n render: recoveryCase => (\n <Text>\n {recoveryCase.eventTotalAmount\n ? formatNumberAsCurrency(parseFloat(recoveryCase.eventTotalAmount))\n : '-'}\n </Text>\n ),\n },\n {\n key: 'amountOutstanding',\n title: t('columns.amountOutstanding'),\n render: recoveryCase => (\n <Text>\n {recoveryCase.amountOutstanding\n ? formatNumberAsCurrency(parseFloat(recoveryCase.amountOutstanding))\n : '-'}\n </Text>\n ),\n },\n {\n key: 'latestErrorCode',\n title: t('columns.latestErrorCode'),\n render: recoveryCase => <ErrorCodeCell errorCode={recoveryCase.latestErrorCode} />,\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: recoveryCase => <StatusCell status={recoveryCase.status} />,\n },\n ],\n itemMenu: recoveryCase => <ResolveButton recoveryCase={recoveryCase} onEvent={onEvent} />,\n })\n\n return (\n <div className={styles.root}>\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('title')}\n </Heading>\n {recoveryCases.length > 0 && <Text>{t('description')}</Text>}\n </Flex>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n </div>\n )\n}\n"],"names":["RecoveryCasesList","props","jsx","BaseComponent","Root","getStatusBadgeStatus","status","ErrorCodeCell","errorCode","useI18n","t","useTranslation","Text","useComponentContext","title","subtitle","useRecoveryCaseErrorCode","jsxs","Flex","StatusCell","Badge","badgeStatus","statusLabel","ResolveButton","recoveryCase","onEvent","Button","recoveryCasesEvents","companyId","dictionary","useComponentDictionary","Heading","data","useRecoveryCasesGetSuspense","recoveryCases","rc","dataViewProps","useDataView","EmptyData","FlexItem","formatNumberAsCurrency","styles","DataView"],"mappings":";;;;;;;;;;;;;;;;AAuBO,SAASA,EAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASI,EAAqBC,GAA8D;AAC1F,SAAIA,MAAW,SACN,SAEF;AACT;AAEA,SAASC,EAAc,EAAE,WAAAC,KAAuD;AAC9E,EAAAC,EAAQ,2BAA2B;AACnC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,2BAA2B,GAClD,EAAE,MAAAC,EAAA,IAASC,EAAA,GACX,EAAE,OAAAC,GAAO,UAAAC,MAAaC,EAAyBR,CAAS;AAE9D,SAAI,CAACM,KAAS,CAACC,IAEX,gBAAAb,EAAC,QAAA,EAAK,cAAYQ,EAAE,mCAAmC,GAAG,aAAU,UACjE,UAAAA,EAAE,0BAA0B,EAAA,CAC/B,IAKF,gBAAAO,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAC/B,UAAA;AAAA,IAAAJ,KAAS,gBAAAZ,EAACU,GAAA,EAAK,QAAO,YAAY,UAAAE,GAAM;AAAA,IACxCC,KAAY,gBAAAb,EAACU,GAAA,EAAM,UAAAG,EAAA,CAAS;AAAA,EAAA,GAC/B;AAEJ;AAEA,SAASI,EAAW,EAAE,QAAAb,KAAsD;AAC1E,EAAAG,EAAQ,2BAA2B;AACnC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,2BAA2B,GAClD,EAAE,OAAAS,EAAA,IAAUP,EAAA;AAElB,MAAI,CAACP;AACH,WAAO;AAGT,QAAMe,IAAchB,EAAqBC,CAAM,GACzCgB,IAAc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MACCG,EAAc,SAAS,uBAAMtB,GAAA,EAAM,UAAA,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,GACvD;AAAA,sBAEC8B,GAAA,EAAU,GAAGN,GAAe,OAAO,EAAE,OAAO,EAAA,CAAG;AAAA,EAAA,EAAA,CAClD,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"RecoveryCasesList.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type {\n RecoveryCase,\n RecoveryCaseStatus,\n} from '@gusto/embedded-api/models/components/recoverycase'\nimport { useRecoveryCasesGetSuspense } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport styles from './RecoveryCasesList.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { EmptyData, Flex, FlexItem } from '@/components/Common'\nimport { recoveryCasesEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\n\ninterface RecoveryCasesListProps extends BaseComponentInterface<'Payroll.RecoveryCasesList'> {\n companyId: string\n}\n\n/** @internal */\nexport function RecoveryCasesList(props: RecoveryCasesListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction getStatusBadgeStatus(status: RecoveryCaseStatus | undefined): BadgeProps['status'] {\n if (status === 'open') {\n return 'info'\n }\n return 'warning'\n}\n\nfunction ErrorCodeCell({ errorCode }: { errorCode: string | null | undefined }) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Text } = useComponentContext()\n const { title, subtitle } = useRecoveryCaseErrorCode(errorCode)\n\n if (!title && !subtitle) {\n return (\n <span aria-label={t('labels.noLatestErrorCodeAriaLabel')} aria-live=\"polite\">\n {t('labels.noLatestErrorCode')}\n </span>\n )\n }\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n {title && <Text weight=\"semibold\">{title}</Text>}\n {subtitle && <Text>{subtitle}</Text>}\n </Flex>\n )\n}\n\nfunction StatusCell({ status }: { status: RecoveryCaseStatus | undefined }) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Badge } = useComponentContext()\n\n if (!status) {\n return null\n }\n\n const badgeStatus = getStatusBadgeStatus(status)\n const statusLabel = t(`status.${status}`)\n\n return <Badge status={badgeStatus}>{statusLabel}</Badge>\n}\n\nfunction ResolveButton({\n recoveryCase,\n onEvent,\n}: {\n recoveryCase: RecoveryCase\n onEvent: BaseComponentInterface['onEvent']\n}) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Button } = useComponentContext()\n\n if (recoveryCase.status !== 'open') {\n return null\n }\n\n return (\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESOLVE, {\n recoveryCaseId: recoveryCase.uuid,\n })\n }}\n >\n {t('cta.resolve')}\n </Button>\n )\n}\n\nfunction Root({ companyId, dictionary, onEvent }: RecoveryCasesListProps) {\n useComponentDictionary('Payroll.RecoveryCasesList', dictionary)\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Heading, Text } = useComponentContext()\n\n const { data } = useRecoveryCasesGetSuspense({\n companyUuid: companyId,\n })\n\n const recoveryCases = (data.recoveryCases ?? []).filter(rc => rc.status !== 'recovered')\n\n const dataViewProps = useDataView({\n data: recoveryCases,\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n columns: [\n {\n key: 'originalDebitDate',\n title: t('columns.originalDebitDate'),\n render: recoveryCase => (\n <FlexItem flexGrow={1}>\n <Text>{recoveryCase.originalDebitDate ?? '-'}</Text>\n </FlexItem>\n ),\n },\n {\n key: 'totalAmount',\n title: t('columns.totalAmount'),\n render: recoveryCase => (\n <Text>\n {recoveryCase.eventTotalAmount\n ? formatNumberAsCurrency(parseFloat(recoveryCase.eventTotalAmount))\n : '-'}\n </Text>\n ),\n },\n {\n key: 'amountOutstanding',\n title: t('columns.amountOutstanding'),\n render: recoveryCase => (\n <Text>\n {recoveryCase.amountOutstanding\n ? formatNumberAsCurrency(parseFloat(recoveryCase.amountOutstanding))\n : '-'}\n </Text>\n ),\n },\n {\n key: 'latestErrorCode',\n title: t('columns.latestErrorCode'),\n render: recoveryCase => <ErrorCodeCell errorCode={recoveryCase.latestErrorCode} />,\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: recoveryCase => <StatusCell status={recoveryCase.status} />,\n },\n ],\n itemMenu: recoveryCase => <ResolveButton recoveryCase={recoveryCase} onEvent={onEvent} />,\n })\n\n return (\n <div className={styles.root}>\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('title')}\n </Heading>\n {recoveryCases.length > 0 && <Text>{t('description')}</Text>}\n </Flex>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n </div>\n )\n}\n"],"names":["RecoveryCasesList","props","jsx","BaseComponent","Root","getStatusBadgeStatus","status","ErrorCodeCell","errorCode","useI18n","t","useTranslation","Text","useComponentContext","title","subtitle","useRecoveryCaseErrorCode","jsxs","Flex","StatusCell","Badge","badgeStatus","statusLabel","ResolveButton","recoveryCase","onEvent","Button","recoveryCasesEvents","companyId","dictionary","useComponentDictionary","Heading","data","useRecoveryCasesGetSuspense","recoveryCases","rc","dataViewProps","useDataView","EmptyData","FlexItem","formatNumberAsCurrency","styles","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AG;AAAA,EAAA,EAAA,CAClD,EAAA,CACF;AAEJ;"}
@@ -7,10 +7,9 @@ import { useRecoveryCaseErrorCode as x } from "../useRecoveryCaseErrorCode.js";
7
7
  import { BaseComponent as D } from "../../../Base/Base.js";
8
8
  import { useBase as B } from "../../../Base/useBase.js";
9
9
  import { Flex as d } from "../../../Common/Flex/Flex.js";
10
- import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import "react";
12
10
  import { Form as F } from "../../../Common/Form/Form.js";
13
11
  import { useFlow as A } from "../../../Flow/useFlow.js";
12
+ import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
13
  import { useComponentDictionary as I, useI18n as O } from "../../../../i18n/I18n.js";
15
14
  import { recoveryCasesEvents as y } from "../../../../shared/constants.js";
16
15
  const R = "gusto-sdk-recovery-cases-resubmit-form";
@@ -1 +1 @@
1
- {"version":3,"file":"RecoveryCasesResubmit.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useRecoveryCasesRedebitMutation,\n mutationKeyRecoveryCasesRedebit,\n} from '@gusto/embedded-api/react-query/recoveryCasesRedebit'\nimport { useRecoveryCasesGet } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport type { RecoveryCasesContextInterface } from '../RecoveryCasesComponents'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { recoveryCasesEvents, type EventType } from '@/shared/constants'\n\nconst RECOVERY_CASES_RESUBMIT_FORM_ID = 'gusto-sdk-recovery-cases-resubmit-form'\n\ninterface RecoveryCasesResubmitProps extends BaseComponentInterface<'Payroll.RecoveryCasesResubmit'> {\n recoveryCaseId: string\n}\n\n/** @internal */\nexport function RecoveryCasesResubmit(props: RecoveryCasesResubmitProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ dictionary, recoveryCaseId }: RecoveryCasesResubmitProps) {\n useComponentDictionary('Payroll.RecoveryCasesResubmit', dictionary)\n const { Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n const { companyId } = useFlow<RecoveryCasesContextInterface>()\n\n const { data: recoveryCasesData } = useRecoveryCasesGet({\n companyUuid: companyId,\n })\n\n const recoveryCase = recoveryCasesData?.recoveryCases?.find(rc => rc.uuid === recoveryCaseId)\n\n const { title, subtitle, description } = useRecoveryCaseErrorCode(\n recoveryCase?.latestErrorCode ?? undefined,\n )\n\n const redebitMutation = useRecoveryCasesRedebitMutation()\n\n const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n await baseSubmitHandler({}, async () => {\n await redebitMutation.mutateAsync({\n request: {\n recoveryCaseUuid: recoveryCaseId,\n },\n })\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE, {\n recoveryCaseId,\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {title && <Heading as=\"h2\">{title}</Heading>}\n {subtitle && <Text>{subtitle}</Text>}\n {description.length > 0 && description}\n {/*\n This empty form is used to connect the Footer's submit button to the submission logic\n via the form attribute. This is semantically incorrect and hidden from assistive tech.\n */}\n <Form id={RECOVERY_CASES_RESUBMIT_FORM_ID} onSubmit={onSubmit} aria-hidden=\"true\">\n {/* Empty form - submission triggered by footer button via form attribute */}\n </Form>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Button } = useComponentContext()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyRecoveryCasesRedebit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_CANCEL)\n }\n\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={RECOVERY_CASES_RESUBMIT_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.resubmit')}\n </Button>\n </Flex>\n )\n}\n\nRecoveryCasesResubmit.Footer = Footer\n"],"names":["RECOVERY_CASES_RESUBMIT_FORM_ID","RecoveryCasesResubmit","props","jsx","BaseComponent","Root","dictionary","recoveryCaseId","useComponentDictionary","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","companyId","useFlow","recoveryCasesData","useRecoveryCasesGet","recoveryCase","rc","title","subtitle","description","useRecoveryCaseErrorCode","redebitMutation","useRecoveryCasesRedebitMutation","onSubmit","e","recoveryCasesEvents","jsxs","Flex","Form","Footer","useI18n","t","useTranslation","Button","isPending","useIsMutating","mutationKeyRecoveryCasesRedebit"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAMA,IAAkC;AAOjC,SAASC,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,gBAAAC,KAA8C;AACxE,EAAAC,EAAuB,iCAAiCF,CAAU;AAClE,QAAM,EAAE,SAAAG,GAAS,MAAAC,EAAA,IAASC,EAAA,GACpB,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,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YAAW,KAAK,IACnC,UAAA;AAAA,IAAA,gBAAA5B,EAACkC,GAAA,EAAO,SAAQ,aAAY,SANX,MAAM;AACzB,MAAAzB,EAAQiB,EAAoB,6BAA6B;AAAA,IAC3D,GAIuD,YAAYS,GAC5D,UAAAH,EAAE,YAAY,EAAA,CACjB;AAAA,IACA,gBAAAhC;AAAA,MAACkC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAMrC;AAAA,QACN,WAAWsC;AAAA,QAEV,YAAE,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEArC,EAAsB,SAASgC;"}
1
+ {"version":3,"file":"RecoveryCasesResubmit.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useRecoveryCasesRedebitMutation,\n mutationKeyRecoveryCasesRedebit,\n} from '@gusto/embedded-api/react-query/recoveryCasesRedebit'\nimport { useRecoveryCasesGet } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport type { RecoveryCasesContextInterface } from '../RecoveryCasesComponents'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { recoveryCasesEvents, type EventType } from '@/shared/constants'\n\nconst RECOVERY_CASES_RESUBMIT_FORM_ID = 'gusto-sdk-recovery-cases-resubmit-form'\n\ninterface RecoveryCasesResubmitProps extends BaseComponentInterface<'Payroll.RecoveryCasesResubmit'> {\n recoveryCaseId: string\n}\n\n/** @internal */\nexport function RecoveryCasesResubmit(props: RecoveryCasesResubmitProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ dictionary, recoveryCaseId }: RecoveryCasesResubmitProps) {\n useComponentDictionary('Payroll.RecoveryCasesResubmit', dictionary)\n const { Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n const { companyId } = useFlow<RecoveryCasesContextInterface>()\n\n const { data: recoveryCasesData } = useRecoveryCasesGet({\n companyUuid: companyId,\n })\n\n const recoveryCase = recoveryCasesData?.recoveryCases?.find(rc => rc.uuid === recoveryCaseId)\n\n const { title, subtitle, description } = useRecoveryCaseErrorCode(\n recoveryCase?.latestErrorCode ?? undefined,\n )\n\n const redebitMutation = useRecoveryCasesRedebitMutation()\n\n const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n await baseSubmitHandler({}, async () => {\n await redebitMutation.mutateAsync({\n request: {\n recoveryCaseUuid: recoveryCaseId,\n },\n })\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE, {\n recoveryCaseId,\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {title && <Heading as=\"h2\">{title}</Heading>}\n {subtitle && <Text>{subtitle}</Text>}\n {description.length > 0 && description}\n {/*\n This empty form is used to connect the Footer's submit button to the submission logic\n via the form attribute. This is semantically incorrect and hidden from assistive tech.\n */}\n <Form id={RECOVERY_CASES_RESUBMIT_FORM_ID} onSubmit={onSubmit} aria-hidden=\"true\">\n {/* Empty form - submission triggered by footer button via form attribute */}\n </Form>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Button } = useComponentContext()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyRecoveryCasesRedebit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_CANCEL)\n }\n\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={RECOVERY_CASES_RESUBMIT_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.resubmit')}\n </Button>\n </Flex>\n )\n}\n\nRecoveryCasesResubmit.Footer = Footer\n"],"names":["RECOVERY_CASES_RESUBMIT_FORM_ID","RecoveryCasesResubmit","props","jsx","BaseComponent","Root","dictionary","recoveryCaseId","useComponentDictionary","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","companyId","useFlow","recoveryCasesData","useRecoveryCasesGet","recoveryCase","rc","title","subtitle","description","useRecoveryCaseErrorCode","redebitMutation","useRecoveryCasesRedebitMutation","onSubmit","e","recoveryCasesEvents","jsxs","Flex","Form","Footer","useI18n","t","useTranslation","Button","isPending","useIsMutating","mutationKeyRecoveryCasesRedebit"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMA,IAAkC;AAOjC,SAASC,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,gBAAAC,KAA8C;AACxE,EAAAC,EAAuB,iCAAiCF,CAAU;AAClE,QAAM,EAAE,SAAAG,GAAS,MAAAC,EAAA,IAASC,EAAA,GACpB,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAEhB,EAAE,MAAMC,EAAA,IAAsBC,EAAoB;AAAA,IACtD,aAAaH;AAAA,EAAA,CACd,GAEKI,IAAeF,GAAmB,eA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,YAAYS,GAC5D,UAAAH,EAAE,YAAY,EAAA,CACjB;AAAA,IACA,gBAAAhC;AAAA,MAACkC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAMrC;AAAA,QACN,WAAWsC;AAAA,QAEV,YAAE,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEArC,EAAsB,SAASgC;"}
@@ -3,7 +3,6 @@ import { useTranslation as a, Trans as c } from "react-i18next";
3
3
  import p from "./RecoveryCaseErrorCode.module.scss.js";
4
4
  import { Flex as C } from "../../Common/Flex/Flex.js";
5
5
  import { useComponentContext as R } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
- import "react";
7
6
  import { useI18n as f } from "../../../i18n/I18n.js";
8
7
  function h(s) {
9
8
  switch (s) {
@@ -19,7 +18,7 @@ function h(s) {
19
18
  return "bankError";
20
19
  }
21
20
  }
22
- function g(s) {
21
+ function v(s) {
23
22
  f("Payroll.RecoveryCasesResubmit");
24
23
  const { t: r } = a("Payroll.RecoveryCasesResubmit"), { Text: o } = R();
25
24
  if (!s)
@@ -60,6 +59,6 @@ function g(s) {
60
59
  };
61
60
  }
62
61
  export {
63
- g as useRecoveryCaseErrorCode
62
+ v as useRecoveryCaseErrorCode
64
63
  };
65
64
  //# sourceMappingURL=useRecoveryCaseErrorCode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRecoveryCaseErrorCode.js","sources":["../../../../src/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport styles from './RecoveryCaseErrorCode.module.scss'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\n/** @internal */\nexport interface RecoveryCaseErrorCodeContent {\n /** Localized title for the error code, or `null` when no error code is set. */\n title: string | null\n /** Localized subtitle for the error code, or `null` when no error code is set. */\n subtitle: string | null\n /** Localized description nodes for the error code, including any per-code instructions. Empty when no error code is set. */\n description: ReactNode[]\n}\n\ntype ErrorCodeKey = 'R01' | 'R02' | 'R16' | 'R29' | 'bankError'\n\nfunction getErrorCodeKey(errorCode: string | null | undefined): ErrorCodeKey {\n switch (errorCode) {\n case 'R01':\n return 'R01'\n case 'R02':\n return 'R02'\n case 'R16':\n return 'R16'\n case 'R29':\n return 'R29'\n default:\n return 'bankError'\n }\n}\n\n/** @internal */\nexport function useRecoveryCaseErrorCode(\n errorCode: string | null | undefined,\n): RecoveryCaseErrorCodeContent {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Text } = useComponentContext()\n\n if (!errorCode) {\n return {\n title: null,\n subtitle: null,\n description: [],\n }\n }\n\n const errorCodeKey = getErrorCodeKey(errorCode)\n\n const transComponents = {\n medium: <Text as=\"span\" weight=\"medium\" />,\n }\n\n const description: ReactNode[] = [\n <Text key=\"body\">\n <Trans t={t} i18nKey={`errorCodes.${errorCodeKey}.body`} components={transComponents} />\n </Text>,\n ]\n\n if (errorCodeKey === 'R29') {\n const achCodes = Object.values(t('errorCodes.R29.achCodes', { returnObjects: true }))\n description.push(\n <Flex key=\"instruction\" flexDirection=\"column\" gap={16}>\n <Text>{t('errorCodes.R29.listDescription')}</Text>\n <ul className={styles.compactList}>\n {achCodes.map((code, index) => (\n <li key={index}>{code}</li>\n ))}\n </ul>\n <Text>\n <Trans t={t} i18nKey=\"errorCodes.R29.instruction\" components={transComponents} />\n </Text>\n </Flex>,\n )\n } else {\n const instruction = t(`errorCodes.${errorCodeKey}.instruction`)\n if (instruction) {\n description.push(\n <Text key=\"instruction\">\n <Trans\n t={t}\n i18nKey={`errorCodes.${errorCodeKey}.instruction`}\n components={transComponents}\n />\n </Text>,\n )\n }\n }\n\n return {\n title: t(`errorCodes.${errorCodeKey}.title`),\n subtitle: t(`errorCodes.${errorCodeKey}.subtitle`),\n description,\n }\n}\n"],"names":["getErrorCodeKey","errorCode","useRecoveryCaseErrorCode","useI18n","t","useTranslation","Text","useComponentContext","errorCodeKey","transComponents","jsx","description","Trans","achCodes","jsxs","Flex","styles","code","index"],"mappings":";;;;;;;AAmBA,SAASA,EAAgBC,GAAoD;AAC3E,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EAAA;AAEb;AAGO,SAASC,EACdD,GAC8B;AAC9B,EAAAE,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GACtD,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,MAAI,CAACN;AACH,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,aAAa,CAAA;AAAA,IAAC;AAIlB,QAAMO,IAAeR,EAAgBC,CAAS,GAExCQ,IAAkB;AAAA,IACtB,QAAQ,gBAAAC,EAACJ,GAAA,EAAK,IAAG,QAAO,QAAO,SAAA,CAAS;AAAA,EAAA,GAGpCK,IAA2B;AAAA,IAC/B,gBAAAD,EAACJ,GAAA,EACC,UAAA,gBAAAI,EAACE,GAAA,EAAM,GAAAR,GAAM,SAAS,cAAcI,CAAY,SAAS,YAAYC,EAAA,CAAiB,EAAA,GAD9E,MAEV;AAAA,EAAA;AAGF,MAAID,MAAiB,OAAO;AAC1B,UAAMK,IAAW,OAAO,OAAOT,EAAE,2BAA2B,EAAE,eAAe,GAAA,CAAM,CAAC;AACpF,IAAAO,EAAY;AAAA,MACV,gBAAAG,EAACC,GAAA,EAAuB,eAAc,UAAS,KAAK,IAClD,UAAA;AAAA,QAAA,gBAAAL,EAACJ,GAAA,EAAM,UAAAF,EAAE,gCAAgC,EAAA,CAAE;AAAA,QAC3C,gBAAAM,EAAC,MAAA,EAAG,WAAWM,EAAO,aACnB,UAAAH,EAAS,IAAI,CAACI,GAAMC,MACnB,gBAAAR,EAAC,MAAA,EAAgB,UAAAO,KAARC,CAAa,CACvB,GACH;AAAA,QACA,gBAAAR,EAACJ,KACC,UAAA,gBAAAI,EAACE,GAAA,EAAM,GAAAR,GAAM,SAAQ,8BAA6B,YAAYK,EAAA,CAAiB,EAAA,CACjF;AAAA,MAAA,EAAA,GATQ,aAUV;AAAA,IAAA;AAAA,EAEJ;AAEE,IADoBL,EAAE,cAAcI,CAAY,cAAc,KAE5DG,EAAY;AAAA,wBACTL,GAAA,EACC,UAAA,gBAAAI;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,GAAAR;AAAA,UACA,SAAS,cAAcI,CAAY;AAAA,UACnC,YAAYC;AAAA,QAAA;AAAA,MAAA,KAJN,aAMV;AAAA,IAAA;AAKN,SAAO;AAAA,IACL,OAAOL,EAAE,cAAcI,CAAY,QAAQ;AAAA,IAC3C,UAAUJ,EAAE,cAAcI,CAAY,WAAW;AAAA,IACjD,aAAAG;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"useRecoveryCaseErrorCode.js","sources":["../../../../src/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport styles from './RecoveryCaseErrorCode.module.scss'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\n/** @internal */\nexport interface RecoveryCaseErrorCodeContent {\n /** Localized title for the error code, or `null` when no error code is set. */\n title: string | null\n /** Localized subtitle for the error code, or `null` when no error code is set. */\n subtitle: string | null\n /** Localized description nodes for the error code, including any per-code instructions. Empty when no error code is set. */\n description: ReactNode[]\n}\n\ntype ErrorCodeKey = 'R01' | 'R02' | 'R16' | 'R29' | 'bankError'\n\nfunction getErrorCodeKey(errorCode: string | null | undefined): ErrorCodeKey {\n switch (errorCode) {\n case 'R01':\n return 'R01'\n case 'R02':\n return 'R02'\n case 'R16':\n return 'R16'\n case 'R29':\n return 'R29'\n default:\n return 'bankError'\n }\n}\n\n/** @internal */\nexport function useRecoveryCaseErrorCode(\n errorCode: string | null | undefined,\n): RecoveryCaseErrorCodeContent {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Text } = useComponentContext()\n\n if (!errorCode) {\n return {\n title: null,\n subtitle: null,\n description: [],\n }\n }\n\n const errorCodeKey = getErrorCodeKey(errorCode)\n\n const transComponents = {\n medium: <Text as=\"span\" weight=\"medium\" />,\n }\n\n const description: ReactNode[] = [\n <Text key=\"body\">\n <Trans t={t} i18nKey={`errorCodes.${errorCodeKey}.body`} components={transComponents} />\n </Text>,\n ]\n\n if (errorCodeKey === 'R29') {\n const achCodes = Object.values(t('errorCodes.R29.achCodes', { returnObjects: true }))\n description.push(\n <Flex key=\"instruction\" flexDirection=\"column\" gap={16}>\n <Text>{t('errorCodes.R29.listDescription')}</Text>\n <ul className={styles.compactList}>\n {achCodes.map((code, index) => (\n <li key={index}>{code}</li>\n ))}\n </ul>\n <Text>\n <Trans t={t} i18nKey=\"errorCodes.R29.instruction\" components={transComponents} />\n </Text>\n </Flex>,\n )\n } else {\n const instruction = t(`errorCodes.${errorCodeKey}.instruction`)\n if (instruction) {\n description.push(\n <Text key=\"instruction\">\n <Trans\n t={t}\n i18nKey={`errorCodes.${errorCodeKey}.instruction`}\n components={transComponents}\n />\n </Text>,\n )\n }\n }\n\n return {\n title: t(`errorCodes.${errorCodeKey}.title`),\n subtitle: t(`errorCodes.${errorCodeKey}.subtitle`),\n description,\n }\n}\n"],"names":["getErrorCodeKey","errorCode","useRecoveryCaseErrorCode","useI18n","t","useTranslation","Text","useComponentContext","errorCodeKey","transComponents","jsx","description","Trans","achCodes","jsxs","Flex","styles","code","index"],"mappings":";;;;;;AAmBA,SAASA,EAAgBC,GAAoD;AAC3E,UAAQA,GAAA;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,EAAA,CAAiB,EAAA,CACjF;AAAA,MAAA,EAAA,GATQ,aAUV;AAAA,IAAA;AAAA,EAEJ;AAEE,IADoBL,EAAE,cAAcI,CAAY,cAAc,KAE5DG,EAAY;AAAA,wBACTL,GAAA,EACC,UAAA,gBAAAI;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,GAAAR;AAAA,UACA,SAAS,cAAcI,CAAY;AAAA,UACnC,YAAYC;AAAA,QAAA;AAAA,MAAA,KAJN,aAMV;AAAA,IAAA;AAKN,SAAO;AAAA,IACL,OAAOL,EAAE,cAAcI,CAAY,QAAQ;AAAA,IAC3C,UAAUJ,EAAE,cAAcI,CAAY,WAAW;AAAA,IACjD,aAAAG;AAAA,EAAA;AAEJ;"}
@@ -11,11 +11,12 @@ import "@gusto/embedded-api/models/errors/apierror";
11
11
  import "@gusto/embedded-api/models/errors/gustoembeddederror";
12
12
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
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
18
  import { retryAsync as x } from "../../helpers/retryAsync.js";
18
- const q = 4, v = 1500, B = (e) => e instanceof T ? e.errors.some((r) => r.category === "invalid_operation") : !1, W = ({
19
+ const q = 4, v = 1500, B = (e) => e instanceof T ? e.errors.some((r) => r.category === "invalid_operation") : !1, Z = ({
19
20
  companyId: e,
20
21
  payrollId: r,
21
22
  employeeUuids: a,
@@ -66,6 +67,6 @@ const q = 4, v = 1500, B = (e) => e instanceof T ? e.errors.some((r) => r.catego
66
67
  };
67
68
  };
68
69
  export {
69
- W as usePreparedPayrollData
70
+ Z as usePreparedPayrollData
70
71
  };
71
72
  //# sourceMappingURL=usePreparedPayrollData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePreparedPayrollData.js","sources":["../../../src/components/Payroll/usePreparedPayrollData.ts"],"sourcesContent":["import { useState, useEffect, useCallback, useRef, useMemo } from 'react'\nimport { usePayrollsPrepareMutation } from '@gusto/embedded-api/react-query/payrollsPrepare'\nimport { usePaySchedulesGet } from '@gusto/embedded-api/react-query/paySchedulesGet'\nimport type { PayrollPrepared } from '@gusto/embedded-api/models/components/payrollshow'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport { UnprocessableEntityError } from '@gusto/embedded-api/models/errors/unprocessableentityerror'\nimport { useBase } from '../Base'\nimport { retryAsync } from '@/helpers/retryAsync'\n\ninterface UsePreparedPayrollDataParams {\n companyId: string\n payrollId: string\n employeeUuids?: string[]\n sortBy?: string\n onDataReady?: (preparedPayroll: PayrollPrepared) => void\n}\n\ninterface UsePreparedPayrollDataReturn {\n handlePreparePayroll: () => Promise<void>\n preparedPayroll: PayrollPrepared | undefined\n paySchedule: PayScheduleShow | undefined\n isLoading: boolean\n isPaginating: boolean\n hasInitialData: boolean\n}\n\nconst PREPARE_MAX_ATTEMPTS = 4\nconst PREPARE_RETRY_DELAY_MS = 1500\n\nconst isPayrollBeingProcessedError = (error: unknown): boolean => {\n if (!(error instanceof UnprocessableEntityError)) return false\n return error.errors.some(e => e.category === 'invalid_operation')\n}\n\n/**\n * Wraps the prepare-payroll mutation and pay-schedule fetch, retrying while the payroll is still being processed.\n *\n * @remarks\n * Fires the prepare call once on mount, then exposes `handlePreparePayroll` for callers that need to re-prepare\n * (e.g. after sort or pagination changes). Distinguishes initial loading from subsequent pagination via\n * `isLoading` and `isPaginating`, and surfaces the pay schedule for the prepared payroll's pay period.\n *\n * @param params - The company and payroll identifiers, plus optional employee filter, sort, and ready callback.\n * @returns The prepared payroll, its pay schedule, loading flags, and a `handlePreparePayroll` callback to re-run.\n * @internal\n */\nexport const usePreparedPayrollData = ({\n companyId,\n payrollId,\n employeeUuids,\n sortBy,\n onDataReady,\n}: UsePreparedPayrollDataParams): UsePreparedPayrollDataReturn => {\n const { mutateAsync: preparePayroll, isPending: isPreparePayrollPending } =\n usePayrollsPrepareMutation()\n const [preparedPayroll, setPreparedPayroll] = useState<PayrollPrepared | undefined>()\n const hasInitialDataRef = useRef(false)\n const hasFiredRef = useRef(false)\n const { baseSubmitHandler } = useBase()\n\n const employeeUuidsKey = useMemo(() => employeeUuids?.join(',') ?? '', [employeeUuids])\n\n const { data: payScheduleData, isLoading: isPayScheduleLoading } = usePaySchedulesGet(\n {\n companyId,\n payScheduleId: preparedPayroll?.payPeriod?.payScheduleUuid || '',\n },\n {\n enabled: !!preparedPayroll?.payPeriod?.payScheduleUuid,\n },\n )\n\n const executePrepare = useCallback(async () => {\n const result = await preparePayroll({\n request: {\n companyId,\n payrollId,\n sortBy,\n requestBody: {\n employeeUuids,\n },\n },\n })\n setPreparedPayroll(result.payrollPrepared)\n if (result.payrollPrepared) {\n hasInitialDataRef.current = true\n onDataReady?.(result.payrollPrepared)\n }\n }, [companyId, payrollId, preparePayroll, employeeUuidsKey, sortBy, onDataReady])\n\n const handlePreparePayroll = useCallback(async () => {\n await baseSubmitHandler(null, () =>\n retryAsync(executePrepare, {\n maxAttempts: PREPARE_MAX_ATTEMPTS,\n delayMs: PREPARE_RETRY_DELAY_MS,\n shouldRetry: isPayrollBeingProcessedError,\n }),\n )\n }, [baseSubmitHandler, executePrepare])\n\n useEffect(() => {\n if (hasFiredRef.current) return\n hasFiredRef.current = true\n void handlePreparePayroll()\n }, [handlePreparePayroll])\n\n const isInitialLoading = isPreparePayrollPending && !hasInitialDataRef.current\n const isPaginating = isPreparePayrollPending && hasInitialDataRef.current\n const isLoading = isInitialLoading || isPayScheduleLoading\n\n return {\n handlePreparePayroll,\n preparedPayroll,\n paySchedule: payScheduleData?.payScheduleShow,\n isLoading,\n isPaginating,\n hasInitialData: hasInitialDataRef.current,\n }\n}\n"],"names":["PREPARE_MAX_ATTEMPTS","PREPARE_RETRY_DELAY_MS","isPayrollBeingProcessedError","error","UnprocessableEntityError","e","usePreparedPayrollData","companyId","payrollId","employeeUuids","sortBy","onDataReady","preparePayroll","isPreparePayrollPending","usePayrollsPrepareMutation","preparedPayroll","setPreparedPayroll","useState","hasInitialDataRef","useRef","hasFiredRef","baseSubmitHandler","useBase","employeeUuidsKey","useMemo","payScheduleData","isPayScheduleLoading","usePaySchedulesGet","executePrepare","useCallback","result","handlePreparePayroll","retryAsync","useEffect","isInitialLoading","isPaginating","isLoading"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,MAAMA,IAAuB,GACvBC,IAAyB,MAEzBC,IAA+B,CAACC,MAC9BA,aAAiBC,IAChBD,EAAM,OAAO,KAAK,CAAAE,MAAKA,EAAE,aAAa,mBAAmB,IADP,IAgB9CC,IAAyB,CAAC;AAAA,EACrC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AACF,MAAkE;AAChE,QAAM,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAC9CC,EAAA,GACI,CAACC,GAAiBC,CAAkB,IAAIC,EAAA,GACxCC,IAAoBC,EAAO,EAAK,GAChCC,IAAcD,EAAO,EAAK,GAC1B,EAAE,mBAAAE,EAAA,IAAsBC,EAAA,GAExBC,IAAmBC,EAAQ,MAAMf,GAAe,KAAK,GAAG,KAAK,IAAI,CAACA,CAAa,CAAC,GAEhF,EAAE,MAAMgB,GAAiB,WAAWC,MAAyBC;AAAA,IACjE;AAAA,MACE,WAAApB;AAAA,MACA,eAAeQ,GAAiB,WAAW,mBAAmB;AAAA,IAAA;AAAA,IAEhE;AAAA,MACE,SAAS,CAAC,CAACA,GAAiB,WAAW;AAAA,IAAA;AAAA,EACzC,GAGIa,IAAiBC,EAAY,YAAY;AAC7C,UAAMC,IAAS,MAAMlB,EAAe;AAAA,MAClC,SAAS;AAAA,QACP,WAAAL;AAAA,QACA,WAAAC;AAAA,QACA,QAAAE;AAAA,QACA,aAAa;AAAA,UACX,eAAAD;AAAA,QAAA;AAAA,MACF;AAAA,IACF,CACD;AACD,IAAAO,EAAmBc,EAAO,eAAe,GACrCA,EAAO,oBACTZ,EAAkB,UAAU,IAC5BP,IAAcmB,EAAO,eAAe;AAAA,EAExC,GAAG,CAACvB,GAAWC,GAAWI,GAAgBW,GAAkBb,GAAQC,CAAW,CAAC,GAE1EoB,IAAuBF,EAAY,YAAY;AACnD,UAAMR;AAAA,MAAkB;AAAA,MAAM,MAC5BW,EAAWJ,GAAgB;AAAA,QACzB,aAAa5B;AAAA,QACb,SAASC;AAAA,QACT,aAAaC;AAAA,MAAA,CACd;AAAA,IAAA;AAAA,EAEL,GAAG,CAACmB,GAAmBO,CAAc,CAAC;AAEtC,EAAAK,EAAU,MAAM;AACd,IAAIb,EAAY,YAChBA,EAAY,UAAU,IACjBW,EAAA;AAAA,EACP,GAAG,CAACA,CAAoB,CAAC;AAEzB,QAAMG,IAAmBrB,KAA2B,CAACK,EAAkB,SACjEiB,IAAetB,KAA2BK,EAAkB,SAC5DkB,IAAYF,KAAoBR;AAEtC,SAAO;AAAA,IACL,sBAAAK;AAAA,IACA,iBAAAhB;AAAA,IACA,aAAaU,GAAiB;AAAA,IAC9B,WAAAW;AAAA,IACA,cAAAD;AAAA,IACA,gBAAgBjB,EAAkB;AAAA,EAAA;AAEtC;"}
1
+ {"version":3,"file":"usePreparedPayrollData.js","sources":["../../../src/components/Payroll/usePreparedPayrollData.ts"],"sourcesContent":["import { useState, useEffect, useCallback, useRef, useMemo } from 'react'\nimport { usePayrollsPrepareMutation } from '@gusto/embedded-api/react-query/payrollsPrepare'\nimport { usePaySchedulesGet } from '@gusto/embedded-api/react-query/paySchedulesGet'\nimport type { PayrollPrepared } from '@gusto/embedded-api/models/components/payrollshow'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport { UnprocessableEntityError } from '@gusto/embedded-api/models/errors/unprocessableentityerror'\nimport { useBase } from '../Base'\nimport { retryAsync } from '@/helpers/retryAsync'\n\ninterface UsePreparedPayrollDataParams {\n companyId: string\n payrollId: string\n employeeUuids?: string[]\n sortBy?: string\n onDataReady?: (preparedPayroll: PayrollPrepared) => void\n}\n\ninterface UsePreparedPayrollDataReturn {\n handlePreparePayroll: () => Promise<void>\n preparedPayroll: PayrollPrepared | undefined\n paySchedule: PayScheduleShow | undefined\n isLoading: boolean\n isPaginating: boolean\n hasInitialData: boolean\n}\n\nconst PREPARE_MAX_ATTEMPTS = 4\nconst PREPARE_RETRY_DELAY_MS = 1500\n\nconst isPayrollBeingProcessedError = (error: unknown): boolean => {\n if (!(error instanceof UnprocessableEntityError)) return false\n return error.errors.some(e => e.category === 'invalid_operation')\n}\n\n/**\n * Wraps the prepare-payroll mutation and pay-schedule fetch, retrying while the payroll is still being processed.\n *\n * @remarks\n * Fires the prepare call once on mount, then exposes `handlePreparePayroll` for callers that need to re-prepare\n * (e.g. after sort or pagination changes). Distinguishes initial loading from subsequent pagination via\n * `isLoading` and `isPaginating`, and surfaces the pay schedule for the prepared payroll's pay period.\n *\n * @param params - The company and payroll identifiers, plus optional employee filter, sort, and ready callback.\n * @returns The prepared payroll, its pay schedule, loading flags, and a `handlePreparePayroll` callback to re-run.\n * @internal\n */\nexport const usePreparedPayrollData = ({\n companyId,\n payrollId,\n employeeUuids,\n sortBy,\n onDataReady,\n}: UsePreparedPayrollDataParams): UsePreparedPayrollDataReturn => {\n const { mutateAsync: preparePayroll, isPending: isPreparePayrollPending } =\n usePayrollsPrepareMutation()\n const [preparedPayroll, setPreparedPayroll] = useState<PayrollPrepared | undefined>()\n const hasInitialDataRef = useRef(false)\n const hasFiredRef = useRef(false)\n const { baseSubmitHandler } = useBase()\n\n const employeeUuidsKey = useMemo(() => employeeUuids?.join(',') ?? '', [employeeUuids])\n\n const { data: payScheduleData, isLoading: isPayScheduleLoading } = usePaySchedulesGet(\n {\n companyId,\n payScheduleId: preparedPayroll?.payPeriod?.payScheduleUuid || '',\n },\n {\n enabled: !!preparedPayroll?.payPeriod?.payScheduleUuid,\n },\n )\n\n const executePrepare = useCallback(async () => {\n const result = await preparePayroll({\n request: {\n companyId,\n payrollId,\n sortBy,\n requestBody: {\n employeeUuids,\n },\n },\n })\n setPreparedPayroll(result.payrollPrepared)\n if (result.payrollPrepared) {\n hasInitialDataRef.current = true\n onDataReady?.(result.payrollPrepared)\n }\n }, [companyId, payrollId, preparePayroll, employeeUuidsKey, sortBy, onDataReady])\n\n const handlePreparePayroll = useCallback(async () => {\n await baseSubmitHandler(null, () =>\n retryAsync(executePrepare, {\n maxAttempts: PREPARE_MAX_ATTEMPTS,\n delayMs: PREPARE_RETRY_DELAY_MS,\n shouldRetry: isPayrollBeingProcessedError,\n }),\n )\n }, [baseSubmitHandler, executePrepare])\n\n useEffect(() => {\n if (hasFiredRef.current) return\n hasFiredRef.current = true\n void handlePreparePayroll()\n }, [handlePreparePayroll])\n\n const isInitialLoading = isPreparePayrollPending && !hasInitialDataRef.current\n const isPaginating = isPreparePayrollPending && hasInitialDataRef.current\n const isLoading = isInitialLoading || isPayScheduleLoading\n\n return {\n handlePreparePayroll,\n preparedPayroll,\n paySchedule: payScheduleData?.payScheduleShow,\n isLoading,\n isPaginating,\n hasInitialData: hasInitialDataRef.current,\n }\n}\n"],"names":["PREPARE_MAX_ATTEMPTS","PREPARE_RETRY_DELAY_MS","isPayrollBeingProcessedError","error","UnprocessableEntityError","e","usePreparedPayrollData","companyId","payrollId","employeeUuids","sortBy","onDataReady","preparePayroll","isPreparePayrollPending","usePayrollsPrepareMutation","preparedPayroll","setPreparedPayroll","useState","hasInitialDataRef","useRef","hasFiredRef","baseSubmitHandler","useBase","employeeUuidsKey","useMemo","payScheduleData","isPayScheduleLoading","usePaySchedulesGet","executePrepare","useCallback","result","handlePreparePayroll","retryAsync","useEffect","isInitialLoading","isPaginating","isLoading"],"mappings":";;;;;;;;;;;;;;;;;;AA0BA,MAAMA,IAAuB,GACvBC,IAAyB,MAEzBC,IAA+B,CAACC,MAC9BA,aAAiBC,IAChBD,EAAM,OA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CAACmB,GAAmBO,CAAc,CAAC;AAEtC,EAAAK,EAAU,MAAM;AACd,IAAIb,EAAY,YAChBA,EAAY,UAAU,IACjBW,EAAA;AAAA,EACP,GAAG,CAACA,CAAoB,CAAC;AAEzB,QAAMG,IAAmBrB,KAA2B,CAACK,EAAkB,SACjEiB,IAAetB,KAA2BK,EAAkB,SAC5DkB,IAAYF,KAAoBR;AAEtC,SAAO;AAAA,IACL,sBAAAK;AAAA,IACA,iBAAAhB;AAAA,IACA,aAAaU,GAAiB;AAAA,IAC9B,WAAAW;AAAA,IACA,cAAAD;AAAA,IACA,gBAAgBjB,EAAkB;AAAA,EAAA;AAEtC;"}
@@ -1,13 +1,12 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { useMemo as D } from "react";
3
3
  import { useTranslation as n } from "react-i18next";
4
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
5
4
  import { useI18n as l } from "../../../i18n/I18n.js";
6
5
  import { PolicyDetailLayout as T } from "../shared/PolicyDetailLayout/PolicyDetailLayout.js";
7
6
  import { useDataView as O } from "../../Common/DataView/useDataView.js";
8
7
  import { DataView as P } from "../../Common/DataView/DataView.js";
9
8
  const v = "holidays";
10
- function _({
9
+ function A({
11
10
  title: t,
12
11
  subtitle: e,
13
12
  onBack: a,
@@ -75,6 +74,6 @@ function x({ holidays: t }) {
75
74
  return /* @__PURE__ */ r(P, { label: e("tableLabel"), ...i });
76
75
  }
77
76
  export {
78
- _ as HolidayPolicyDetailPresentation
77
+ A as HolidayPolicyDetailPresentation
79
78
  };
80
79
  //# sourceMappingURL=HolidayPolicyDetailPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HolidayPolicyDetailPresentation.js","sources":["../../../../src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { HolidayItem } from '../HolidaySelectionForm/HolidaySelectionFormTypes'\nimport { PolicyDetailLayout } from '../shared/PolicyDetailLayout'\nimport type { HolidayPolicyDetailPresentationProps } from './HolidayPolicyDetailTypes'\nimport { DataView, useDataView } from '@/components/Common'\nimport { useI18n } from '@/i18n'\n\nconst HOLIDAYS_TAB_ID = 'holidays'\n\n/** @internal */\nexport function HolidayPolicyDetailPresentation({\n title,\n subtitle,\n onBack,\n backLabel,\n actions,\n holidays,\n selectedTabId,\n onTabChange,\n employees,\n onAddEmployee,\n removeDialog,\n successAlert,\n onDismissAlert,\n}: HolidayPolicyDetailPresentationProps) {\n useI18n('Company.TimeOff.HolidayPolicy')\n const { t } = useTranslation('Company.TimeOff.HolidayPolicy')\n\n const holidaysTabContent = <HolidaysTab holidays={holidays} />\n\n return (\n <PolicyDetailLayout\n title={title}\n subtitle={subtitle}\n onBack={onBack}\n backLabel={backLabel}\n actions={actions}\n firstTab={{\n id: HOLIDAYS_TAB_ID,\n label: t('tabs.holidays'),\n content: holidaysTabContent,\n }}\n selectedTabId={selectedTabId}\n onTabChange={onTabChange}\n employees={employees}\n onAddEmployee={onAddEmployee}\n removeDialog={removeDialog}\n successAlert={successAlert}\n onDismissAlert={onDismissAlert}\n />\n )\n}\n\nfunction HolidaysTab({ holidays }: { holidays: HolidayItem[] }) {\n useI18n('Company.TimeOff.HolidayPolicy')\n const { t } = useTranslation('Company.TimeOff.HolidayPolicy')\n\n const columns = useMemo(\n () => [\n {\n key: 'name' as keyof HolidayItem,\n title: t('tableHeaders.holidayName'),\n render: (item: HolidayItem) => item.name,\n },\n {\n key: 'observedDate' as keyof HolidayItem,\n title: t('tableHeaders.observedDate'),\n render: (item: HolidayItem) => item.observedDate,\n },\n {\n key: 'nextObservation' as keyof HolidayItem,\n title: t('tableHeaders.nextObservation'),\n render: (item: HolidayItem) => item.nextObservation,\n },\n ],\n [t],\n )\n\n const dataViewProps = useDataView<HolidayItem>({\n data: holidays,\n columns,\n })\n\n return <DataView label={t('tableLabel')} {...dataViewProps} />\n}\n"],"names":["HOLIDAYS_TAB_ID","HolidayPolicyDetailPresentation","title","subtitle","onBack","backLabel","actions","holidays","selectedTabId","onTabChange","employees","onAddEmployee","removeDialog","successAlert","onDismissAlert","useI18n","t","useTranslation","holidaysTabContent","jsx","HolidaysTab","PolicyDetailLayout","columns","useMemo","item","dataViewProps","useDataView","DataView"],"mappings":";;;;;;;;AAQA,MAAMA,IAAkB;AAGjB,SAASC,EAAgC;AAAA,EAC9C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AACF,GAAyC;AACvC,EAAAC,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GAEtDC,IAAqB,gBAAAC,EAACC,GAAA,EAAY,UAAAb,EAAA,CAAoB;AAE5D,SACE,gBAAAY;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAAnB;AAAA,MACA,UAAAC;AAAA,MACA,QAAAC;AAAA,MACA,WAAAC;AAAA,MACA,SAAAC;AAAA,MACA,UAAU;AAAA,QACR,IAAIN;AAAA,QACJ,OAAOgB,EAAE,eAAe;AAAA,QACxB,SAASE;AAAA,MAAA;AAAA,MAEX,eAAAV;AAAA,MACA,aAAAC;AAAA,MACA,WAAAC;AAAA,MACA,eAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,SAASM,EAAY,EAAE,UAAAb,KAAyC;AAC9D,EAAAQ,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GAEtDK,IAAUC;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,KAAK;AAAA,QACL,OAAOP,EAAE,0BAA0B;AAAA,QACnC,QAAQ,CAACQ,MAAsBA,EAAK;AAAA,MAAA;AAAA,MAEtC;AAAA,QACE,KAAK;AAAA,QACL,OAAOR,EAAE,2BAA2B;AAAA,QACpC,QAAQ,CAACQ,MAAsBA,EAAK;AAAA,MAAA;AAAA,MAEtC;AAAA,QACE,KAAK;AAAA,QACL,OAAOR,EAAE,8BAA8B;AAAA,QACvC,QAAQ,CAACQ,MAAsBA,EAAK;AAAA,MAAA;AAAA,IACtC;AAAA,IAEF,CAACR,CAAC;AAAA,EAAA,GAGES,IAAgBC,EAAyB;AAAA,IAC7C,MAAMnB;AAAA,IACN,SAAAe;AAAA,EAAA,CACD;AAED,2BAAQK,GAAA,EAAS,OAAOX,EAAE,YAAY,GAAI,GAAGS,GAAe;AAC9D;"}
1
+ {"version":3,"file":"HolidayPolicyDetailPresentation.js","sources":["../../../../src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { HolidayItem } from '../HolidaySelectionForm/HolidaySelectionFormTypes'\nimport { PolicyDetailLayout } from '../shared/PolicyDetailLayout'\nimport type { HolidayPolicyDetailPresentationProps } from './HolidayPolicyDetailTypes'\nimport { DataView, useDataView } from '@/components/Common'\nimport { useI18n } from '@/i18n'\n\nconst HOLIDAYS_TAB_ID = 'holidays'\n\n/** @internal */\nexport function HolidayPolicyDetailPresentation({\n title,\n subtitle,\n onBack,\n backLabel,\n actions,\n holidays,\n selectedTabId,\n onTabChange,\n employees,\n onAddEmployee,\n removeDialog,\n successAlert,\n onDismissAlert,\n}: HolidayPolicyDetailPresentationProps) {\n useI18n('Company.TimeOff.HolidayPolicy')\n const { t } = useTranslation('Company.TimeOff.HolidayPolicy')\n\n const holidaysTabContent = <HolidaysTab holidays={holidays} />\n\n return (\n <PolicyDetailLayout\n title={title}\n subtitle={subtitle}\n onBack={onBack}\n backLabel={backLabel}\n actions={actions}\n firstTab={{\n id: HOLIDAYS_TAB_ID,\n label: t('tabs.holidays'),\n content: holidaysTabContent,\n }}\n selectedTabId={selectedTabId}\n onTabChange={onTabChange}\n employees={employees}\n onAddEmployee={onAddEmployee}\n removeDialog={removeDialog}\n successAlert={successAlert}\n onDismissAlert={onDismissAlert}\n />\n )\n}\n\nfunction HolidaysTab({ holidays }: { holidays: HolidayItem[] }) {\n useI18n('Company.TimeOff.HolidayPolicy')\n const { t } = useTranslation('Company.TimeOff.HolidayPolicy')\n\n const columns = useMemo(\n () => [\n {\n key: 'name' as keyof HolidayItem,\n title: t('tableHeaders.holidayName'),\n render: (item: HolidayItem) => item.name,\n },\n {\n key: 'observedDate' as keyof HolidayItem,\n title: t('tableHeaders.observedDate'),\n render: (item: HolidayItem) => item.observedDate,\n },\n {\n key: 'nextObservation' as keyof HolidayItem,\n title: t('tableHeaders.nextObservation'),\n render: (item: HolidayItem) => item.nextObservation,\n },\n ],\n [t],\n )\n\n const dataViewProps = useDataView<HolidayItem>({\n data: holidays,\n columns,\n })\n\n return <DataView label={t('tableLabel')} {...dataViewProps} />\n}\n"],"names":["HOLIDAYS_TAB_ID","HolidayPolicyDetailPresentation","title","subtitle","onBack","backLabel","actions","holidays","selectedTabId","onTabChange","employees","onAddEmployee","removeDialog","successAlert","onDismissAlert","useI18n","t","useTranslation","holidaysTabContent","jsx","HolidaysTab","PolicyDetailLayout","columns","useMemo","item","dataViewProps","useDataView","DataView"],"mappings":";;;;;;;AAQA,MAAMA,IAAkB;AAGjB,SAASC,EAAgC;AAAA,EAC9C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AACF,GAAyC;AACvC,EAAAC,EAAQ,+BAA+B;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odResolver as _ } from "@hookform/resolvers/zod";
7
7
  import a from "./PolicySettings.module.scss.js";
8
8
  import { Flex as L } from "../../Common/Flex/Flex.js";
9
9
  import { ActionsLayout as j } from "../../Common/ActionsLayout/ActionsLayout.js";
10
- import { useComponentContext as z } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { Form as A } from "../../Common/Form/Form.js";
10
+ import { Form as z } from "../../Common/Form/Form.js";
11
+ import { useComponentContext as A } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
12
  import { useI18n as B } from "../../../i18n/I18n.js";
13
13
  import { NumberInputField as c } from "../../Common/Fields/NumberInputField/NumberInputField.js";
14
14
  import { SwitchField as r } from "../../Common/Fields/SwitchField/SwitchField.js";
@@ -33,7 +33,7 @@ function re({
33
33
  isPending: b = !1
34
34
  }) {
35
35
  B("Company.TimeOff.CreateTimeOffPolicy");
36
- const { t: e } = W("Company.TimeOff.CreateTimeOffPolicy"), { Heading: N, Button: p } = z(), g = t(), y = t(), h = t(), f = t(), x = t(), m = k({
36
+ const { t: e } = W("Company.TimeOff.CreateTimeOffPolicy"), { Heading: N, Button: p } = A(), g = t(), y = t(), h = t(), f = t(), x = t(), m = k({
37
37
  resolver: _(q),
38
38
  defaultValues: {
39
39
  accrualMaximumEnabled: !1,
@@ -46,7 +46,7 @@ function re({
46
46
  }), { control: o } = m, H = s({ control: o, name: "accrualMaximumEnabled" }), C = s({ control: o, name: "balanceMaximumEnabled" }), F = s({ control: o, name: "carryOverLimitEnabled" }), I = s({ control: o, name: "waitingPeriodEnabled" }), S = d === "hours_worked", v = d === "fixed_per_pay_period", T = S || v, D = S || v, R = (V) => {
47
47
  M(V);
48
48
  };
49
- return /* @__PURE__ */ i(U, { ...m, children: /* @__PURE__ */ i(A, { "aria-labelledby": g, onSubmit: m.handleSubmit(R), children: /* @__PURE__ */ i("div", { className: a.policySettings, children: /* @__PURE__ */ l(L, { flexDirection: "column", gap: 32, children: [
49
+ return /* @__PURE__ */ i(U, { ...m, children: /* @__PURE__ */ i(z, { "aria-labelledby": g, onSubmit: m.handleSubmit(R), children: /* @__PURE__ */ i("div", { className: a.policySettings, children: /* @__PURE__ */ l(L, { flexDirection: "column", gap: 32, children: [
50
50
  /* @__PURE__ */ i(N, { as: "h2", id: g, children: w === "edit" && u ? e("policySettings.editTitle", { name: u }) : e("policySettings.createTitle") }),
51
51
  /* @__PURE__ */ l(L, { flexDirection: "column", gap: 20, children: [
52
52
  T && /* @__PURE__ */ l(O, { children: [
@@ -4,8 +4,8 @@ import { useForm as v, useWatch as x, FormProvider as C } from "react-hook-form"
4
4
  import { useTranslation as L } from "react-i18next";
5
5
  import { Flex as c } from "../../Common/Flex/Flex.js";
6
6
  import { ActionsLayout as g } from "../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as S } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import { Form as F } from "../../Common/Form/Form.js";
7
+ import { Form as S } from "../../Common/Form/Form.js";
8
+ import { useComponentContext as F } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
9
  import { useI18n as H } from "../../../i18n/I18n.js";
10
10
  import { RadioGroupField as O } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
11
11
  function G({
@@ -15,7 +15,7 @@ function G({
15
15
  holidayPolicyExists: r = !1
16
16
  }) {
17
17
  H("Company.TimeOff.SelectPolicyType");
18
- const { t: e } = L("Company.TimeOff.SelectPolicyType"), { Heading: d, Text: y, Button: l } = S(), a = T(), t = v({
18
+ const { t: e } = L("Company.TimeOff.SelectPolicyType"), { Heading: d, Text: y, Button: l } = F(), a = T(), t = v({
19
19
  defaultValues: {
20
20
  policyType: m
21
21
  }
@@ -40,7 +40,7 @@ function G({
40
40
  }, [e, r]), h = (o) => {
41
41
  p(o.policyType);
42
42
  };
43
- return /* @__PURE__ */ i(C, { ...t, children: /* @__PURE__ */ i(F, { "aria-labelledby": a, onSubmit: t.handleSubmit(h), children: /* @__PURE__ */ n(c, { flexDirection: "column", gap: 24, children: [
43
+ return /* @__PURE__ */ i(C, { ...t, children: /* @__PURE__ */ i(S, { "aria-labelledby": a, onSubmit: t.handleSubmit(h), children: /* @__PURE__ */ n(c, { flexDirection: "column", gap: 24, children: [
44
44
  /* @__PURE__ */ n(c, { flexDirection: "column", gap: 4, children: [
45
45
  /* @__PURE__ */ i(d, { as: "h2", id: a, children: e("title") }),
46
46
  /* @__PURE__ */ i(y, { variant: "supporting", children: e("policyTypeHint") })
@@ -1,4 +1,4 @@
1
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as y, jsx as n } from "react/jsx-runtime";
2
2
  import { PolicyList as E } from "../PolicyList/PolicyList.js";
3
3
  import { PolicyTypeSelector as h } from "../PolicyTypeSelector/PolicyTypeSelector.js";
4
4
  import { PolicySettings as u } from "../PolicySettings/PolicySettings.js";
@@ -10,22 +10,20 @@ import { ViewHolidayEmployees as v } from "../ViewHolidayEmployees/ViewHolidayEm
10
10
  import { ViewHolidaySchedule as g } from "../ViewHolidaySchedule/ViewHolidaySchedule.js";
11
11
  import { assertCreatablePolicyType as I } from "./timeOffPolicyTypes.js";
12
12
  import { useFlow as p } from "../../Flow/useFlow.js";
13
- import { Flex as y } from "../../Common/Flex/Flex.js";
14
- import "react-i18next";
15
- import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "react";
13
+ import { Flex as m } from "../../Common/Flex/Flex.js";
17
14
  import { ensureRequired as l } from "../../../helpers/ensureRequired.js";
15
+ import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
18
16
  import { PolicyConfigurationForm as A } from "../TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js";
19
- function M() {
17
+ function J() {
20
18
  const { onEvent: t, companyId: e, alerts: i } = p(), { Alert: c } = a();
21
- return /* @__PURE__ */ m(y, { flexDirection: "column", gap: 8, children: [
19
+ return /* @__PURE__ */ y(m, { flexDirection: "column", gap: 8, children: [
22
20
  i?.map((o, r) => /* @__PURE__ */ n(c, { status: o.type, label: o.title, children: o.content }, r)),
23
21
  /* @__PURE__ */ n(E, { onEvent: t, companyId: l(e) })
24
22
  ] });
25
23
  }
26
- function N() {
24
+ function K() {
27
25
  const { onEvent: t, companyId: e, policyType: i, alerts: c } = p(), { Alert: o } = a(), r = i === "sick" || i === "vacation" || i === "holiday" ? i : void 0;
28
- return /* @__PURE__ */ m(y, { flexDirection: "column", gap: 8, children: [
26
+ return /* @__PURE__ */ y(m, { flexDirection: "column", gap: 8, children: [
29
27
  c?.map((d, s) => /* @__PURE__ */ n(o, { status: d.type, label: d.title, children: d.content }, s)),
30
28
  /* @__PURE__ */ n(
31
29
  h,
@@ -37,9 +35,9 @@ function N() {
37
35
  )
38
36
  ] });
39
37
  }
40
- function Q() {
38
+ function M() {
41
39
  const { onEvent: t, companyId: e, policyType: i, policyId: c, alerts: o } = p(), { Alert: r } = a(), d = l(i);
42
- return I(d), /* @__PURE__ */ m(y, { flexDirection: "column", gap: 8, children: [
40
+ return I(d), /* @__PURE__ */ y(m, { flexDirection: "column", gap: 8, children: [
43
41
  o?.map((s, x) => /* @__PURE__ */ n(r, { status: s.type, label: s.title, children: s.content }, x)),
44
42
  /* @__PURE__ */ n(
45
43
  A,
@@ -52,21 +50,21 @@ function Q() {
52
50
  )
53
51
  ] });
54
52
  }
55
- function U() {
53
+ function N() {
56
54
  const { onEvent: t, policyId: e, alerts: i } = p(), { Alert: c } = a();
57
- return /* @__PURE__ */ m(y, { flexDirection: "column", gap: 8, children: [
55
+ return /* @__PURE__ */ y(m, { flexDirection: "column", gap: 8, children: [
58
56
  i?.map((o, r) => /* @__PURE__ */ n(c, { status: o.type, label: o.title, children: o.content }, r)),
59
57
  /* @__PURE__ */ n(u, { onEvent: t, policyId: l(e), mode: "create" })
60
58
  ] });
61
59
  }
62
- function W() {
60
+ function Q() {
63
61
  const { onEvent: t, policyId: e, alerts: i } = p(), { Alert: c } = a();
64
- return /* @__PURE__ */ m(y, { flexDirection: "column", gap: 8, children: [
62
+ return /* @__PURE__ */ y(m, { flexDirection: "column", gap: 8, children: [
65
63
  i?.map((o, r) => /* @__PURE__ */ n(c, { status: o.type, label: o.title, children: o.content }, r)),
66
64
  /* @__PURE__ */ n(u, { onEvent: t, policyId: l(e), mode: "edit" })
67
65
  ] });
68
66
  }
69
- function X() {
67
+ function U() {
70
68
  const { onEvent: t, companyId: e, policyId: i, policyType: c } = p(), o = l(c);
71
69
  return I(o), /* @__PURE__ */ n(
72
70
  P,
@@ -78,48 +76,48 @@ function X() {
78
76
  }
79
77
  );
80
78
  }
81
- function Y() {
79
+ function W() {
82
80
  const { onEvent: t, policyId: e } = p();
83
81
  return /* @__PURE__ */ n(C, { onEvent: t, policyId: l(e) });
84
82
  }
85
- function Z() {
83
+ function X() {
86
84
  const { onEvent: t, companyId: e, alerts: i } = p(), { Alert: c } = a();
87
- return /* @__PURE__ */ m(y, { flexDirection: "column", gap: 8, children: [
85
+ return /* @__PURE__ */ y(m, { flexDirection: "column", gap: 8, children: [
88
86
  i?.map((o, r) => /* @__PURE__ */ n(c, { status: o.type, label: o.title, children: o.content }, r)),
89
87
  /* @__PURE__ */ n(f, { onEvent: t, companyId: l(e), mode: "create" })
90
88
  ] });
91
89
  }
92
- function _() {
90
+ function Y() {
93
91
  const { onEvent: t, companyId: e, alerts: i } = p(), { Alert: c } = a();
94
- return /* @__PURE__ */ m(y, { flexDirection: "column", gap: 8, children: [
92
+ return /* @__PURE__ */ y(m, { flexDirection: "column", gap: 8, children: [
95
93
  i?.map((o, r) => /* @__PURE__ */ n(c, { status: o.type, label: o.title, children: o.content }, r)),
96
94
  /* @__PURE__ */ n(f, { onEvent: t, companyId: l(e), mode: "edit" })
97
95
  ] });
98
96
  }
99
- function $() {
97
+ function Z() {
100
98
  const { onEvent: t, companyId: e } = p();
101
99
  return /* @__PURE__ */ n(T, { onEvent: t, companyId: l(e) });
102
100
  }
103
- function oo() {
101
+ function _() {
104
102
  const { onEvent: t, companyId: e } = p();
105
103
  return /* @__PURE__ */ n(v, { onEvent: t, companyId: l(e) });
106
104
  }
107
- function to() {
105
+ function $() {
108
106
  const { onEvent: t, companyId: e } = p();
109
107
  return /* @__PURE__ */ n(g, { onEvent: t, companyId: l(e) });
110
108
  }
111
109
  export {
112
- $ as AddEmployeesHolidayContextual,
113
- X as AddEmployeesToPolicyContextual,
114
- _ as EditHolidaySelectionFormContextual,
115
- W as EditPolicySettingsContextual,
116
- Z as HolidaySelectionFormContextual,
117
- Q as PolicyDetailsFormContextual,
118
- M as PolicyListContextual,
119
- U as PolicySettingsContextual,
120
- N as SelectPolicyTypeContextual,
121
- Y as TimeOffPolicyDetailContextual,
122
- oo as ViewHolidayEmployeesContextual,
123
- to as ViewHolidayScheduleContextual
110
+ Z as AddEmployeesHolidayContextual,
111
+ U as AddEmployeesToPolicyContextual,
112
+ Y as EditHolidaySelectionFormContextual,
113
+ Q as EditPolicySettingsContextual,
114
+ X as HolidaySelectionFormContextual,
115
+ M as PolicyDetailsFormContextual,
116
+ J as PolicyListContextual,
117
+ N as PolicySettingsContextual,
118
+ K as SelectPolicyTypeContextual,
119
+ W as TimeOffPolicyDetailContextual,
120
+ _ as ViewHolidayEmployeesContextual,
121
+ $ as ViewHolidayScheduleContextual
124
122
  };
125
123
  //# sourceMappingURL=TimeOffFlowComponents.js.map