@gusto/embedded-react-sdk 0.17.0 → 0.18.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 (364) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/components/Base/Base.js +50 -65
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Base/useBase.d.ts +2 -5
  5. package/dist/components/Base/useBase.js.map +1 -1
  6. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +42 -36
  7. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  8. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +1 -1
  9. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -7
  11. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -13
  13. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  14. package/dist/components/Common/SignatureForm/SignatureFormFields.js +10 -13
  15. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  16. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +8 -8
  17. package/dist/components/Common/UI/Dialog/Dialog.js +50 -76
  18. package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
  19. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +8 -14
  20. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js.map +1 -1
  21. package/dist/components/Common/UI/Link/LinkTypes.d.ts +7 -6
  22. package/dist/components/Common/UI/Modal/Modal.d.ts +2 -0
  23. package/dist/components/Common/UI/Modal/Modal.js +90 -0
  24. package/dist/components/Common/UI/Modal/Modal.js.map +1 -0
  25. package/dist/components/Common/UI/Modal/Modal.module.scss.js +26 -0
  26. package/dist/components/Common/UI/Modal/Modal.module.scss.js.map +1 -0
  27. package/dist/components/Common/UI/Modal/ModalTypes.d.ts +34 -0
  28. package/dist/components/Common/UI/Modal/ModalTypes.js +8 -0
  29. package/dist/components/Common/UI/Modal/ModalTypes.js.map +1 -0
  30. package/dist/components/Common/UI/Modal/index.d.ts +3 -0
  31. package/dist/components/Common/UI/Tabs/Tabs.d.ts +0 -5
  32. package/dist/components/Common/UI/Tabs/Tabs.js +45 -16
  33. package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -1
  34. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +8 -4
  35. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js.map +1 -1
  36. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +7 -0
  37. package/dist/components/Common/index.d.ts +0 -1
  38. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
  39. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  40. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  41. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  42. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
  43. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
  45. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  46. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
  47. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  48. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -6
  49. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  50. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
  51. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  52. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
  53. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  54. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
  55. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  56. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -6
  57. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  58. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  59. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  60. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -8
  61. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  62. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  63. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  64. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  65. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  66. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -6
  67. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  68. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
  69. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  70. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
  71. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  72. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  73. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  74. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
  75. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  76. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -13
  77. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  78. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -6
  79. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  80. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -8
  81. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  82. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -6
  83. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  84. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  85. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  86. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -17
  87. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  88. package/dist/components/Company/FederalTaxes/Form.js +2 -4
  89. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  90. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -11
  91. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  92. package/dist/components/Company/Industry/Actions.js +5 -7
  93. package/dist/components/Company/Industry/Actions.js.map +1 -1
  94. package/dist/components/Company/Industry/Context.js +7 -9
  95. package/dist/components/Company/Industry/Context.js.map +1 -1
  96. package/dist/components/Company/Industry/Edit.js +10 -12
  97. package/dist/components/Company/Industry/Edit.js.map +1 -1
  98. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
  99. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  100. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  101. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  102. package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -12
  103. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -6
  105. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  107. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationsList/List.js +6 -8
  109. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  110. package/dist/components/Company/Locations/LocationsList/LocationsList.js +12 -14
  111. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  112. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -6
  113. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  114. package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
  115. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  116. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
  117. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  118. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
  119. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  120. package/dist/components/Company/OnboardingOverview/context.js +4 -6
  121. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  122. package/dist/components/Company/PaySchedule/PaySchedule.js +40 -42
  123. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  124. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -12
  125. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  126. package/dist/components/Company/PaySchedule/_parts/Edit.js +35 -37
  127. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  128. package/dist/components/Company/PaySchedule/_parts/Head.js +17 -19
  129. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  130. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  131. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  132. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -8
  133. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  134. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
  135. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  136. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -6
  137. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  138. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
  139. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
  141. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  142. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -6
  143. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  144. package/dist/components/Contractor/Address/Address.js +4 -6
  145. package/dist/components/Contractor/Address/Address.js.map +1 -1
  146. package/dist/components/Contractor/Address/Form.js +2 -3
  147. package/dist/components/Contractor/Address/Form.js.map +1 -1
  148. package/dist/components/Contractor/Address/useAddress.js +6 -8
  149. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  150. package/dist/components/Contractor/ContractorList/index.js +30 -31
  151. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  152. package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
  153. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  154. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +4 -6
  155. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  156. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  157. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  158. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  159. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  160. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -4
  161. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  162. package/dist/components/Contractor/Submit/Submit.js +3 -4
  163. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  164. package/dist/components/Employee/Compensation/Actions.js +5 -6
  165. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  166. package/dist/components/Employee/Compensation/Edit.js +10 -9
  167. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  168. package/dist/components/Employee/Compensation/List.js +23 -25
  169. package/dist/components/Employee/Compensation/List.js.map +1 -1
  170. package/dist/components/Employee/Deductions/DeductionsComponents.js +1 -1
  171. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  172. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +6 -6
  173. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +2 -2
  174. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +3 -4
  175. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  176. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +44 -40
  177. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  178. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +3 -4
  179. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  180. package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
  181. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  182. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  183. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +9 -11
  184. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  185. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  186. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  187. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -6
  188. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  189. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -13
  190. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  191. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -6
  192. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  193. package/dist/components/Employee/EmployeeList/Actions.js +4 -6
  194. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  195. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  196. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  197. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  198. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  199. package/dist/components/Employee/EmployeeList/List.js +18 -19
  200. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  201. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -6
  202. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  203. package/dist/components/Employee/FederalTaxes/Actions.js +6 -8
  204. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  205. package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -13
  206. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  207. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +8 -8
  208. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  209. package/dist/components/Employee/FederalTaxes/Head.js +6 -6
  210. package/dist/components/Employee/FederalTaxes/Head.js.map +1 -1
  211. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -6
  212. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  213. package/dist/components/Employee/Landing/Landing.js +12 -13
  214. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  215. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  216. package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
  217. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  218. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -5
  219. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  220. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -11
  221. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  222. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
  223. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  224. package/dist/components/Employee/PaymentMethod/Split.js +3 -4
  225. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  226. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -8
  227. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  228. package/dist/components/Employee/Profile/Actions.js +7 -9
  229. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  230. package/dist/components/Employee/Profile/AdminPersonalDetails.js +38 -35
  231. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  232. package/dist/components/Employee/Profile/HomeAddress.d.ts +52 -0
  233. package/dist/components/Employee/Profile/HomeAddress.js +63 -44
  234. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  235. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +20 -21
  236. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  237. package/dist/components/Employee/Profile/Profile.js +150 -143
  238. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  239. package/dist/components/Employee/Profile/useProfile.d.ts +1 -0
  240. package/dist/components/Employee/Profile/useProfile.js +4 -6
  241. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  242. package/dist/components/Employee/StateTaxes/Actions.js +8 -10
  243. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  244. package/dist/components/Employee/StateTaxes/StateTaxes.js +4 -4
  245. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  246. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -6
  247. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  248. package/dist/components/Employee/Taxes/Actions.js +8 -10
  249. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  250. package/dist/components/Employee/Taxes/FederalForm.js +9 -11
  251. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  252. package/dist/components/Employee/Taxes/FederalHead.js +6 -6
  253. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  254. package/dist/components/Employee/Taxes/Taxes.js +5 -5
  255. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  256. package/dist/components/Employee/Taxes/useTaxes.js +4 -6
  257. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  258. package/dist/components/Flow/Flow.js +16 -18
  259. package/dist/components/Flow/Flow.js.map +1 -1
  260. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +9 -11
  261. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  262. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +6 -7
  263. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  264. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +64 -64
  265. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  266. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +133 -135
  267. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  268. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +5 -3
  269. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -1
  270. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +127 -119
  271. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  272. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -7
  273. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  274. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -1
  275. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +22 -22
  276. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  277. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +40 -27
  278. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  279. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +50 -72
  280. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  281. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +2 -4
  282. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  283. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +1 -1
  284. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +4 -4
  285. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  286. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +20 -20
  287. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  288. package/dist/components/Payroll/PayrollList/PayrollList.js +24 -21
  289. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  290. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -9
  291. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +117 -129
  292. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  293. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +6 -6
  294. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +89 -78
  295. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  296. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +192 -211
  297. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  298. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss.js +8 -0
  299. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss.js.map +1 -0
  300. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
  301. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  302. package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
  303. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  304. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +40 -38
  305. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  306. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  307. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  308. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  309. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +5 -8
  310. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  311. package/dist/helpers/apiErrorToList.d.ts +7 -0
  312. package/dist/helpers/apiErrorToList.js +23 -0
  313. package/dist/helpers/apiErrorToList.js.map +1 -0
  314. package/dist/helpers/breadcrumbHelpers.js +30 -30
  315. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  316. package/dist/helpers/dateFormatting.d.ts +15 -7
  317. package/dist/helpers/dateFormatting.js +88 -35
  318. package/dist/helpers/dateFormatting.js.map +1 -1
  319. package/dist/helpers/formattedStrings.js +11 -12
  320. package/dist/helpers/formattedStrings.js.map +1 -1
  321. package/dist/hooks/useAsyncError.js.map +1 -0
  322. package/dist/hooks/useDateFormatter.d.ts +19 -0
  323. package/dist/hooks/useDateFormatter.js +24 -0
  324. package/dist/hooks/useDateFormatter.js.map +1 -0
  325. package/dist/hooks/useMenu.js.map +1 -0
  326. package/dist/{components/Common/hooks → hooks}/useNumberFormatter.js +1 -1
  327. package/dist/hooks/useNumberFormatter.js.map +1 -0
  328. package/dist/hooks/useOverflowDetection/index.d.ts +3 -0
  329. package/dist/hooks/useOverflowDetection/useOverflowDetection.d.ts +7 -0
  330. package/dist/hooks/useOverflowDetection/useOverflowDetection.js +28 -0
  331. package/dist/hooks/useOverflowDetection/useOverflowDetection.js.map +1 -0
  332. package/dist/i18n/en/Company.PaySchedule.json.js +9 -9
  333. package/dist/i18n/en/Employee.Compensation.json.js +15 -15
  334. package/dist/i18n/en/Employee.Deductions.json.js +131 -105
  335. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  336. package/dist/i18n/en/Employee.FederalTaxes.json.js +9 -9
  337. package/dist/i18n/en/Employee.HomeAddress.json.js +1 -1
  338. package/dist/i18n/en/Employee.Taxes.json.js +25 -27
  339. package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
  340. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
  341. package/dist/i18n/en/Payroll.PayrollOverview.json.js +23 -23
  342. package/dist/i18n/en/common.json.d.ts +2 -1
  343. package/dist/i18n/en/common.json.js +4 -4
  344. package/dist/style.css +1 -1
  345. package/dist/types/i18next.d.ts +16 -1
  346. package/package.json +9 -9
  347. package/dist/components/Common/hooks/useAsyncError.js.map +0 -1
  348. package/dist/components/Common/hooks/useMenu.js.map +0 -1
  349. package/dist/components/Common/hooks/useNumberFormatter.js.map +0 -1
  350. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -221
  351. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
  352. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
  353. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
  354. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -132
  355. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
  356. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
  357. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
  358. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +0 -98
  359. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +0 -1
  360. /package/dist/{components/Common/hooks → hooks}/useAsyncError.d.ts +0 -0
  361. /package/dist/{components/Common/hooks → hooks}/useAsyncError.js +0 -0
  362. /package/dist/{components/Common/hooks → hooks}/useMenu.d.ts +0 -0
  363. /package/dist/{components/Common/hooks → hooks}/useMenu.js +0 -0
  364. /package/dist/{components/Common/hooks → hooks}/useNumberFormatter.d.ts +0 -0
@@ -1,20 +1,18 @@
1
1
  import { jsxs as e, Fragment as d, jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import { usePaySchedule as m } from "../usePaySchedule.js";
4
- import "classnames";
5
- import "../../../../shared/constants.js";
6
- import { ActionsLayout as r } from "../../../Common/ActionsLayout/ActionsLayout.js";
4
+ import { ActionsLayout as a } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
5
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- const v = () => {
9
- const { t: n } = l("Company.PaySchedule"), { mode: i, handleAdd: a, handleCancel: c, handleContinue: s } = m(), t = u();
6
+ const S = () => {
7
+ const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: r, handleCancel: i, handleContinue: s } = m(), t = u();
10
8
  return /* @__PURE__ */ e(d, { children: [
11
- i === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(r, { children: [
9
+ c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(a, { children: [
12
10
  /* @__PURE__ */ o(
13
11
  t.Button,
14
12
  {
15
13
  variant: "secondary",
16
14
  onClick: () => {
17
- a();
15
+ r();
18
16
  },
19
17
  children: n("addAnotherPayScheduleCta")
20
18
  }
@@ -30,26 +28,26 @@ const v = () => {
30
28
  }
31
29
  )
32
30
  ] }),
33
- i === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
31
+ c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
34
32
  /* @__PURE__ */ o(
35
33
  t.Button,
36
34
  {
37
35
  variant: "secondary",
38
36
  onClick: () => {
39
- c();
37
+ i();
40
38
  },
41
39
  children: n("actions.cancel")
42
40
  }
43
41
  ),
44
42
  /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
45
43
  ] }),
46
- i === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
44
+ c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
47
45
  /* @__PURE__ */ o(
48
46
  t.Button,
49
47
  {
50
48
  variant: "secondary",
51
49
  onClick: () => {
52
- c();
50
+ i();
53
51
  },
54
52
  children: n("actions.cancel")
55
53
  }
@@ -59,6 +57,6 @@ const v = () => {
59
57
  ] });
60
58
  };
61
59
  export {
62
- v as Actions
60
+ S as Actions
63
61
  };
64
62
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAA,GACpDC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR,MAAS,0CACPS,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAJ,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAAA;AAAA,MAE/B,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,EAAA,CACtD;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAA,GACpDC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR,MAAS,0CACPS,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAJ,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAAA;AAAA,MAE/B,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,EAAA,CACtD;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,29 +1,27 @@
1
1
  import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
- import { useFormContext as C, useWatch as y } from "react-hook-form";
3
- import { useTranslation as S } from "react-i18next";
4
- import { useState as g, useEffect as T } from "react";
5
- import { usePaySchedule as x } from "../usePaySchedule.js";
2
+ import { useFormContext as q, useWatch as p } from "react-hook-form";
3
+ import { useTranslation as C } from "react-i18next";
4
+ import { useState as g, useEffect as S } from "react";
5
+ import { usePaySchedule as T } from "../usePaySchedule.js";
6
6
  import l from "./Edit.module.scss.js";
7
- import { Flex as h } from "../../../Common/Flex/Flex.js";
8
- import { Grid as E } from "../../../Common/Grid/Grid.js";
9
- import "classnames";
10
- import { useComponentContext as N } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { useLocale as O } from "../../../../contexts/LocaleProvider/useLocale.js";
12
- import { formatDateNamedWeekdayShortPlusDate as f } from "../../../../helpers/dateFormatting.js";
13
- import { TextInputField as R } from "../../../Common/Fields/TextInputField/TextInputField.js";
14
- import { SelectField as F } from "../../../Common/Fields/SelectField/SelectField.js";
15
- import { RadioGroupField as M } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
16
- import { NumberInputField as P } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
17
- import { DatePickerField as D } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
18
- const Q = () => {
19
- const o = N(), { t: e } = S("Company.PaySchedule"), { locale: u } = O(), { payPeriodPreview: r, mode: p, payPreviewLoading: v } = x(), { setValue: d } = C(), [a, b] = g(0), i = y({ name: "frequency" }), n = y({ name: "customTwicePerMonth" }), w = i === "Twice per month" && n === "custom" || i === "Monthly", q = i === "Twice per month" && n === "custom";
20
- return T(() => {
21
- i === "Twice per month" && n === "1st15th" && (d("day1", 15), d("day2", 31));
22
- }, [i, n, d]), p !== "EDIT_PAY_SCHEDULE" && p !== "ADD_PAY_SCHEDULE" ? null : /* @__PURE__ */ t("div", { className: l.payScheduleContainer, children: /* @__PURE__ */ m(E, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
23
- /* @__PURE__ */ t("div", { className: l.payScheduleForm, children: /* @__PURE__ */ m(h, { flexDirection: "column", children: [
24
- /* @__PURE__ */ t(R, { name: "customName", label: e("labels.name"), isRequired: !0 }),
7
+ import { Flex as y } from "../../../Common/Flex/Flex.js";
8
+ import { Grid as x } from "../../../Common/Grid/Grid.js";
9
+ import { useComponentContext as E } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import { useDateFormatter as N } from "../../../../hooks/useDateFormatter.js";
11
+ import { TextInputField as F } from "../../../Common/Fields/TextInputField/TextInputField.js";
12
+ import { SelectField as R } from "../../../Common/Fields/SelectField/SelectField.js";
13
+ import { RadioGroupField as O } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
14
+ import { NumberInputField as h } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
15
+ import { DatePickerField as f } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
16
+ const J = () => {
17
+ const n = E(), { t: e } = C("Company.PaySchedule"), P = N(), { payPeriodPreview: r, mode: u, payPreviewLoading: D } = T(), { setValue: d } = q(), [a, v] = g(0), i = p({ name: "frequency" }), o = p({ name: "customTwicePerMonth" }), b = i === "Twice per month" && o === "custom" || i === "Monthly", w = i === "Twice per month" && o === "custom";
18
+ return S(() => {
19
+ i === "Twice per month" && o === "1st15th" && (d("day1", 15), d("day2", 31));
20
+ }, [i, o, d]), u !== "EDIT_PAY_SCHEDULE" && u !== "ADD_PAY_SCHEDULE" ? null : /* @__PURE__ */ t("div", { className: l.payScheduleContainer, children: /* @__PURE__ */ m(x, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
21
+ /* @__PURE__ */ t("div", { className: l.payScheduleForm, children: /* @__PURE__ */ m(y, { flexDirection: "column", children: [
22
+ /* @__PURE__ */ t(F, { name: "customName", label: e("labels.name"), isRequired: !0 }),
25
23
  /* @__PURE__ */ t(
26
- F,
24
+ R,
27
25
  {
28
26
  name: "frequency",
29
27
  label: e("labels.frequency"),
@@ -37,7 +35,7 @@ const Q = () => {
37
35
  }
38
36
  ),
39
37
  i === "Twice per month" && /* @__PURE__ */ t(
40
- M,
38
+ O,
41
39
  {
42
40
  name: "customTwicePerMonth",
43
41
  label: e("labels.frequencyOptions"),
@@ -49,7 +47,7 @@ const Q = () => {
49
47
  }
50
48
  ),
51
49
  /* @__PURE__ */ t(
52
- D,
50
+ f,
53
51
  {
54
52
  name: "anchorPayDate",
55
53
  label: e("labels.firstPayDate"),
@@ -58,7 +56,7 @@ const Q = () => {
58
56
  }
59
57
  ),
60
58
  /* @__PURE__ */ t(
61
- D,
59
+ f,
62
60
  {
63
61
  name: "anchorEndOfPayPeriod",
64
62
  label: e("labels.firstPayPeriodEndDate"),
@@ -66,28 +64,28 @@ const Q = () => {
66
64
  isRequired: !0
67
65
  }
68
66
  ),
69
- /* @__PURE__ */ t("div", { className: w ? "" : l.visuallyHidden, children: /* @__PURE__ */ t(P, { name: "day1", label: e("labels.firstPayDayOfTheMonth"), isRequired: !0 }) }),
70
- /* @__PURE__ */ t("div", { className: q ? "" : l.visuallyHidden, children: /* @__PURE__ */ t(P, { name: "day2", label: e("labels.lastPayDayOfTheMonth"), isRequired: !0 }) })
67
+ /* @__PURE__ */ t("div", { className: b ? "" : l.visuallyHidden, children: /* @__PURE__ */ t(h, { name: "day1", label: e("labels.firstPayDayOfTheMonth"), isRequired: !0 }) }),
68
+ /* @__PURE__ */ t("div", { className: w ? "" : l.visuallyHidden, children: /* @__PURE__ */ t(h, { name: "day2", label: e("labels.lastPayDayOfTheMonth"), isRequired: !0 }) })
71
69
  ] }) }),
72
- /* @__PURE__ */ t(h, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: r && r[a] ? /* @__PURE__ */ m("div", { className: l.calendarContainer, children: [
73
- !v && /* @__PURE__ */ t(
74
- o.Select,
70
+ /* @__PURE__ */ t(y, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: r && r[a] ? /* @__PURE__ */ m("div", { className: l.calendarContainer, children: [
71
+ !D && /* @__PURE__ */ t(
72
+ n.Select,
75
73
  {
76
74
  label: e("labels.preview"),
77
75
  isRequired: !0,
78
76
  options: r.map((s, c) => ({
79
77
  value: String(c),
80
- label: `${f(s.startDate, u)} – ${f(s.endDate, u)}`
78
+ label: P.formatPayPeriodRange(s.startDate, s.endDate)
81
79
  })),
82
80
  value: String(a),
83
81
  onChange: (s) => {
84
82
  const c = Number(s);
85
- isNaN(c) || b(c);
83
+ isNaN(c) || v(c);
86
84
  }
87
85
  }
88
86
  ),
89
87
  /* @__PURE__ */ t(
90
- o.CalendarPreview,
88
+ n.CalendarPreview,
91
89
  {
92
90
  dateRange: {
93
91
  start: new Date(r[a].startDate),
@@ -110,11 +108,11 @@ const Q = () => {
110
108
  a
111
109
  )
112
110
  ] }) : /* @__PURE__ */ t("div", { className: l.calendarContainer, children: /* @__PURE__ */ t(
113
- o.Alert,
111
+ n.Alert,
114
112
  {
115
113
  status: "info",
116
114
  label: e("previewAlert.title", "Pay Schedule Preview"),
117
- children: /* @__PURE__ */ t(o.Text, { children: e(
115
+ children: /* @__PURE__ */ t(n.Text, { children: e(
118
116
  "previewAlert.description",
119
117
  "Complete all the required fields on the left to see a preview of your pay schedule."
120
118
  ) })
@@ -123,6 +121,6 @@ const Q = () => {
123
121
  ] }) });
124
122
  };
125
123
  export {
126
- Q as Edit
124
+ J as Edit
127
125
  };
128
126
  //# sourceMappingURL=Edit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Edit.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { useEffect, useState } from 'react'\nimport type { PayScheduleInputs } from '../usePaySchedule'\nimport { usePaySchedule } from '../usePaySchedule'\nimport style from './Edit.module.scss'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n Grid,\n TextInputField,\n NumberInputField,\n DatePickerField,\n} from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useLocale } from '@/contexts/LocaleProvider'\nimport { formatDateNamedWeekdayShortPlusDate } from '@/helpers/dateFormatting'\n\nexport const Edit = () => {\n const Components = useComponentContext()\n const { t } = useTranslation('Company.PaySchedule')\n const { locale } = useLocale()\n const { payPeriodPreview, mode, payPreviewLoading } = usePaySchedule()\n const { setValue } = useFormContext<PayScheduleInputs>()\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState<number>(0)\n\n const frequency = useWatch({ name: 'frequency' })\n const customTwicePerMonth = useWatch({ name: 'customTwicePerMonth' })\n\n const shouldShowDay1 =\n (frequency === 'Twice per month' && customTwicePerMonth === 'custom') || frequency === 'Monthly'\n const shouldShowDay2 = frequency === 'Twice per month' && customTwicePerMonth === 'custom'\n\n useEffect(() => {\n if (frequency === 'Twice per month' && customTwicePerMonth === '1st15th') {\n setValue('day1', 15)\n setValue('day2', 31)\n }\n }, [frequency, customTwicePerMonth, setValue])\n\n if (mode !== 'EDIT_PAY_SCHEDULE' && mode !== 'ADD_PAY_SCHEDULE') {\n return null\n }\n\n return (\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection={'column'}>\n <TextInputField name=\"customName\" label={t('labels.name')} isRequired />\n <SelectField\n name=\"frequency\"\n label={t('labels.frequency')}\n options={[\n { value: 'Every week', label: t('frequencies.everyWeek') },\n { value: 'Every other week', label: t('frequencies.everyOtherWeek') },\n { value: 'Twice per month', label: t('frequencies.twicePerMonth') },\n { value: 'Monthly', label: t('frequencies.monthly') },\n ]}\n isRequired\n />\n {frequency === 'Twice per month' && (\n <RadioGroupField\n name=\"customTwicePerMonth\"\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n options={[\n { value: '1st15th', label: t('frequencyOptions.15thAndLast') },\n { value: 'custom', label: t('frequencyOptions.custom') },\n ]}\n />\n )}\n <DatePickerField\n name=\"anchorPayDate\"\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription')}\n isRequired\n />\n <DatePickerField\n name=\"anchorEndOfPayPeriod\"\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n isRequired\n />\n <div className={shouldShowDay1 ? '' : style.visuallyHidden}>\n <NumberInputField name=\"day1\" label={t('labels.firstPayDayOfTheMonth')} isRequired />\n </div>\n <div className={shouldShowDay2 ? '' : style.visuallyHidden}>\n <NumberInputField name=\"day2\" label={t('labels.lastPayDayOfTheMonth')} isRequired />\n </div>\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => {\n return {\n value: String(index),\n label: `${formatDateNamedWeekdayShortPlusDate(period.startDate, locale)} – ${formatDateNamedWeekdayShortPlusDate(period.endDate, locale)}`,\n }\n })}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(payPeriodPreview[selectedPayPeriodIndex].startDate as string),\n end: new Date(payPeriodPreview[selectedPayPeriodIndex].endDate as string),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(payPeriodPreview[selectedPayPeriodIndex].checkDate as string),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(payPeriodPreview[selectedPayPeriodIndex].runPayrollBy as string),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n )\n}\n"],"names":["Edit","Components","useComponentContext","t","useTranslation","locale","useLocale","payPeriodPreview","mode","payPreviewLoading","usePaySchedule","setValue","useFormContext","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","frequency","useWatch","customTwicePerMonth","shouldShowDay1","shouldShowDay2","useEffect","jsx","style","jsxs","Grid","Flex","TextInputField","SelectField","RadioGroupField","DatePickerField","NumberInputField","period","index","formatDateNamedWeekdayShortPlusDate","value","numericValue"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACb,EAAE,kBAAAC,GAAkB,MAAAC,GAAM,mBAAAC,EAAA,IAAsBC,EAAA,GAChD,EAAE,UAAAC,EAAA,IAAa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A,UACA;AAAA,QAAA,EACF,CACF;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CAEJ;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"Edit.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Edit.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { useEffect, useState } from 'react'\nimport type { PayScheduleInputs } from '../usePaySchedule'\nimport { usePaySchedule } from '../usePaySchedule'\nimport style from './Edit.module.scss'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n Grid,\n TextInputField,\n NumberInputField,\n DatePickerField,\n} from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport const Edit = () => {\n const Components = useComponentContext()\n const { t } = useTranslation('Company.PaySchedule')\n const dateFormatter = useDateFormatter()\n const { payPeriodPreview, mode, payPreviewLoading } = usePaySchedule()\n const { setValue } = useFormContext<PayScheduleInputs>()\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState<number>(0)\n\n const frequency = useWatch({ name: 'frequency' })\n const customTwicePerMonth = useWatch({ name: 'customTwicePerMonth' })\n\n const shouldShowDay1 =\n (frequency === 'Twice per month' && customTwicePerMonth === 'custom') || frequency === 'Monthly'\n const shouldShowDay2 = frequency === 'Twice per month' && customTwicePerMonth === 'custom'\n\n useEffect(() => {\n if (frequency === 'Twice per month' && customTwicePerMonth === '1st15th') {\n setValue('day1', 15)\n setValue('day2', 31)\n }\n }, [frequency, customTwicePerMonth, setValue])\n\n if (mode !== 'EDIT_PAY_SCHEDULE' && mode !== 'ADD_PAY_SCHEDULE') {\n return null\n }\n\n return (\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection={'column'}>\n <TextInputField name=\"customName\" label={t('labels.name')} isRequired />\n <SelectField\n name=\"frequency\"\n label={t('labels.frequency')}\n options={[\n { value: 'Every week', label: t('frequencies.everyWeek') },\n { value: 'Every other week', label: t('frequencies.everyOtherWeek') },\n { value: 'Twice per month', label: t('frequencies.twicePerMonth') },\n { value: 'Monthly', label: t('frequencies.monthly') },\n ]}\n isRequired\n />\n {frequency === 'Twice per month' && (\n <RadioGroupField\n name=\"customTwicePerMonth\"\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n options={[\n { value: '1st15th', label: t('frequencyOptions.15thAndLast') },\n { value: 'custom', label: t('frequencyOptions.custom') },\n ]}\n />\n )}\n <DatePickerField\n name=\"anchorPayDate\"\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription')}\n isRequired\n />\n <DatePickerField\n name=\"anchorEndOfPayPeriod\"\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n isRequired\n />\n <div className={shouldShowDay1 ? '' : style.visuallyHidden}>\n <NumberInputField name=\"day1\" label={t('labels.firstPayDayOfTheMonth')} isRequired />\n </div>\n <div className={shouldShowDay2 ? '' : style.visuallyHidden}>\n <NumberInputField name=\"day2\" label={t('labels.lastPayDayOfTheMonth')} isRequired />\n </div>\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => {\n return {\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(period.startDate, period.endDate),\n }\n })}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(payPeriodPreview[selectedPayPeriodIndex].startDate as string),\n end: new Date(payPeriodPreview[selectedPayPeriodIndex].endDate as string),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(payPeriodPreview[selectedPayPeriodIndex].checkDate as string),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(payPeriodPreview[selectedPayPeriodIndex].runPayrollBy as string),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n )\n}\n"],"names":["Edit","Components","useComponentContext","t","useTranslation","dateFormatter","useDateFormatter","payPeriodPreview","mode","payPreviewLoading","usePaySchedule","setValue","useFormContext","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","frequency","useWatch","customTwicePerMonth","shouldShowDay1","shouldShowDay2","useEffect","jsx","style","jsxs","Grid","Flex","TextInputField","SelectField","RadioGroupField","DatePickerField","NumberInputField","period","index","value","numericValue"],"mappings":";;;;;;;;;;;;;;;AAkBO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAgBC,EAAA,GAChB,EAAE,kBAAAC,GAAkB,MAAAC,GAAM,mBAAAC,EAAA,IAAsBC,EAAA,GAChD,EAAE,UAAAC,EAAA,IAAaC,EAAA,GACf,CAACC,GAAwBC,CAAyB,IAAIC,EAAiB,CAAC,GAExEC,IAAYC,EAAS,EAAE,MAAM,aAAa,GAC1CC,IAAsBD,EAAS,EAAE,MAAM,uBAAuB,GAE9D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
- import { useTranslation as c, Trans as a } from "react-i18next";
1
+ import { jsx as e, jsxs as s, Fragment as a } from "react/jsx-runtime";
2
+ import { useTranslation as c, Trans as o } from "react-i18next";
3
3
  import { usePaySchedule as d } from "../usePaySchedule.js";
4
4
  import { Flex as h } from "../../../Common/Flex/Flex.js";
5
- import "classnames";
6
- import "../../../../shared/constants.js";
7
5
  import { useComponentContext as l } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- const S = () => {
9
- const { t } = c("Company.PaySchedule"), n = l(), { mode: r } = d();
10
- let i = /* @__PURE__ */ e(o, {});
6
+ const y = () => {
7
+ const { t: i } = c("Company.PaySchedule"), n = l(), { mode: r } = d();
8
+ let t = /* @__PURE__ */ e(a, {});
11
9
  switch (r) {
12
10
  case "LIST_PAY_SCHEDULES":
13
- i = /* @__PURE__ */ s(o, { children: [
14
- /* @__PURE__ */ e(n.Heading, { as: "h2", children: t("headings.pageTitle") }),
11
+ t = /* @__PURE__ */ s(a, { children: [
12
+ /* @__PURE__ */ e(n.Heading, { as: "h2", children: i("headings.pageTitle") }),
15
13
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
16
- a,
14
+ o,
17
15
  {
18
16
  i18nKey: "listDescription",
19
- t,
17
+ t: i,
20
18
  components: {
21
- how_to_choose_schedule: /* @__PURE__ */ e(n.Link, {})
19
+ ScheduleLink: /* @__PURE__ */ e(n.Link, {})
22
20
  }
23
21
  }
24
22
  ) }),
25
23
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
26
- a,
24
+ o,
27
25
  {
28
26
  i18nKey: "listDescription2",
29
- t,
27
+ t: i,
30
28
  components: {
31
- payment_law_doc: /* @__PURE__ */ e(n.Link, {})
29
+ PaymentLawLink: /* @__PURE__ */ e(n.Link, {})
32
30
  }
33
31
  }
34
32
  ) })
35
33
  ] });
36
34
  break;
37
35
  case "ADD_PAY_SCHEDULE":
38
- i = /* @__PURE__ */ e(n.Heading, { as: "h2", children: t("headings.addPaySchedule") });
36
+ t = /* @__PURE__ */ e(n.Heading, { as: "h2", children: i("headings.addPaySchedule") });
39
37
  break;
40
38
  case "EDIT_PAY_SCHEDULE":
41
- i = /* @__PURE__ */ e(n.Heading, { as: "h2", children: t("headings.editPaySchedule") });
39
+ t = /* @__PURE__ */ e(n.Heading, { as: "h2", children: i("headings.editPaySchedule") });
42
40
  break;
43
41
  }
44
- return /* @__PURE__ */ e(h, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ e("header", { children: i }) });
42
+ return /* @__PURE__ */ e(h, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ e("header", { children: t }) });
45
43
  };
46
44
  export {
47
- S as Head
45
+ y as Head
48
46
  };
49
47
  //# sourceMappingURL=Head.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n how_to_choose_schedule: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n payment_law_doc: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAAC,EAAA,IAASC,EAAA;AACjB,MAAIC,IAAoC,gBAAAC,EAAAC,GAAA,EAAE;AAE1C,UAAQJ,GAAA;AAAA,IACN,KAAK;AACH,MAAAE,IACE,gBAAAG,EAAAD,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAD,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,oBAAoB,GAAE;AAAA,QACrD,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT;AAAA,YACA,YAAY;AAAA,cACV,wBAAwB,gBAAAH,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UAC3C;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT;AAAA,YACA,YAAY;AAAA,cACV,iBAAiB,gBAAAH,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACpC;AAAA,QAAA,EACF,CACF;AAAA,MAAA,GACF;AAEF;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,yBAAyB,GAAE;AAE5D;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,0BAA0B,GAAE;AAE7D;AAAA,EACF;AAGF,SACE,gBAAAK,EAACI,GAAA,EAAK,gBAAe,iBAAgB,eAAe,UAAU,KAAK,GACjE,UAAA,gBAAAJ,EAAC,UAAA,EAAQ,UAAAD,EAAA,CAAc,GACzB;AAEJ;"}
1
+ {"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n ScheduleLink: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n PaymentLawLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;AAMO,MAAM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-1,38 +1,36 @@
1
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
2
  import { useTranslation as h } from "react-i18next";
3
3
  import { usePaySchedule as y } from "../usePaySchedule.js";
4
4
  import o from "./List.module.scss.js";
5
5
  import { Flex as s } from "../../../Common/Flex/Flex.js";
6
- import "classnames";
7
- import "../../../../shared/constants.js";
8
6
  import f from "../../../../assets/icons/pencil.svg.js";
9
7
  import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
8
  import { VisuallyHidden as v } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
9
  import { HamburgerMenu as g } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
12
10
  import { useDataView as L } from "../../../Common/DataView/useDataView.js";
13
11
  import { DataView as C } from "../../../Common/DataView/DataView.js";
14
- const F = () => {
15
- const { t: r } = h("Company.PaySchedule"), n = S(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
16
- data: m || [],
12
+ const H = () => {
13
+ const { t: n } = h("Company.PaySchedule"), r = S(), { paySchedules: c, mode: m, handleEdit: l } = y(), { ...d } = L({
14
+ data: c || [],
17
15
  columns: [
18
16
  {
19
- title: r("payScheduleList.name"),
17
+ title: n("payScheduleList.name"),
20
18
  key: "customName",
21
19
  render: (t) => {
22
20
  const a = !!t.name;
23
21
  let i = a ? t.name : t.customName;
24
22
  i && i.length > 1 ? i = i.charAt(0).toUpperCase() + i.slice(1) : i = t.customName;
25
- const p = t.customName;
26
- return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ u("div", { className: o.content, children: [
23
+ const u = t.customName;
24
+ return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ p("div", { className: o.content, children: [
27
25
  /* @__PURE__ */ e("div", { children: i }),
28
- a && /* @__PURE__ */ e("div", { children: p })
26
+ a && /* @__PURE__ */ e("div", { children: u })
29
27
  ] }) });
30
28
  }
31
29
  },
32
30
  {
33
- title: /* @__PURE__ */ e(v, { children: r("payScheduleList.active") }),
31
+ title: /* @__PURE__ */ e(v, { children: n("payScheduleList.active") }),
34
32
  key: "active",
35
- render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(n.Badge, { status: "success", children: r("payScheduleList.active") }) : /* @__PURE__ */ e(n.Badge, { status: "info", children: r("payScheduleList.inactive") }) }) })
33
+ render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(r.Badge, { status: "success", children: n("payScheduleList.active") }) : /* @__PURE__ */ e(r.Badge, { status: "info", children: n("payScheduleList.inactive") }) }) })
36
34
  }
37
35
  ],
38
36
  itemMenu: (t) => /* @__PURE__ */ e(
@@ -41,7 +39,7 @@ const F = () => {
41
39
  triggerLabel: "Actions",
42
40
  items: [
43
41
  {
44
- label: r("payScheduleList.edit"),
42
+ label: n("payScheduleList.edit"),
45
43
  onClick: () => {
46
44
  l(t);
47
45
  },
@@ -51,9 +49,9 @@ const F = () => {
51
49
  }
52
50
  )
53
51
  });
54
- return c !== "LIST_PAY_SCHEDULES" ? null : /* @__PURE__ */ e(C, { label: "test", ...d });
52
+ return m !== "LIST_PAY_SCHEDULES" ? null : /* @__PURE__ */ e(C, { label: "test", ...d });
55
53
  };
56
54
  export {
57
- F as List
55
+ H as List
58
56
  };
59
57
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":";;;;;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,I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B,GAAE,GAEnE,EAAA,CACF;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEF,UAAU,CAAAU,MAEN,gBAAAI;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,cAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,OAAOnB,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAM,EAAWI,CAAQ;AAAA,YACrB;AAAA,YACA,MAAM,gBAAAI,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SAAIf,MAAS,uBACJ,OAGF,gBAAAS,EAACO,GAAA,EAAS,OAAM,QAAQ,GAAGb,GAAe;AACnD;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":";;;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,MAAAC,GAAM,YAAAC,EAAA,IAAeC,EAAA,GAErC,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAML,KAAgB,CAAA;AAAA,IACtB,SAAS;AAAA,MACP;AAAA,QACE,OAAOJ,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAU,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,EAAS,OAAOA,EAAS;AACrD,UAAIE,KAAeA,EAAY,SAAS,IACtCA,IAAcA,EAAY,OAAO,CAAC,EAAE,gBAAgBA,EAAY,MAAM,CAAC,IAEvEA,IAAcF,EAAS;AAEzB,gBAAM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api/models/errors/unprocessableentityerrorobject";
9
9
  import "@tanstack/react-query";
10
10
  import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
- import "classnames";
13
- import "dompurify";
14
- import "../../../contexts/LocaleProvider/useLocale.js";
15
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import "dompurify";
16
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
17
- const S = o.object({
15
+ const s = o.object({
18
16
  frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
19
17
  anchorPayDate: o.date().optional(),
20
18
  anchorEndOfPayPeriod: o.date().optional(),
@@ -22,10 +20,10 @@ const S = o.object({
22
20
  day2: o.number().min(1).max(31).optional(),
23
21
  customName: o.string().optional(),
24
22
  customTwicePerMonth: o.string().optional()
25
- }), [f, w] = t("PayScheduleContext");
23
+ }), [x, S] = t("PayScheduleContext");
26
24
  export {
27
- w as PayScheduleProvider,
28
- S as PayScheduleSchema,
29
- f as usePaySchedule
25
+ S as PayScheduleProvider,
26
+ s as PayScheduleSchema,
27
+ x as usePaySchedule
30
28
  };
31
29
  //# sourceMappingURL=usePaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
1
+ {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
@@ -1,18 +1,16 @@
1
1
  import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useStateTaxesForm as s } from "./context.js";
4
- import "classnames";
5
- import "../../../../shared/constants.js";
6
4
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
5
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function y() {
9
- const { t } = a("Company.StateTaxes", { keyPrefix: "form" }), { handleCancel: r, isPending: e } = s(), o = c();
6
+ function d() {
7
+ const { t } = a("Company.StateTaxes", { keyPrefix: "form" }), { handleCancel: e, isPending: r } = s(), o = c();
10
8
  return /* @__PURE__ */ i(m, { children: [
11
- /* @__PURE__ */ n(o.Button, { variant: "secondary", onClick: r, children: t("cancelCta") }),
12
- /* @__PURE__ */ n(o.Button, { variant: "primary", type: "submit", isDisabled: e, children: t("saveCta") })
9
+ /* @__PURE__ */ n(o.Button, { variant: "secondary", onClick: e, children: t("cancelCta") }),
10
+ /* @__PURE__ */ n(o.Button, { variant: "primary", type: "submit", isDisabled: r, children: t("saveCta") })
13
11
  ] });
14
12
  }
15
13
  export {
16
- y as Actions
14
+ d as Actions
17
15
  };
18
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
@@ -8,14 +8,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
- import "classnames";
12
- import "dompurify";
13
- import "../../../../contexts/LocaleProvider/useLocale.js";
14
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "dompurify";
15
13
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesFormContext");
14
+ const [T, c] = t("StateTaxesFormContext");
17
15
  export {
18
- u as StateTaxesFormProvider,
19
- d as useStateTaxesForm
16
+ c as StateTaxesFormProvider,
17
+ T as useStateTaxesForm
20
18
  };
21
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
@@ -1,15 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
3
  import { useStateTaxesList as e } from "./context.js";
4
- import "classnames";
5
- import "../../../../shared/constants.js";
6
- import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function x() {
9
- const { t: o } = i("Company.StateTaxes"), n = s(), { handleContinue: r } = e();
10
- return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
4
+ import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ function f() {
7
+ const { t: o } = i("Company.StateTaxes"), n = m(), { handleContinue: r } = e();
8
+ return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
11
9
  }
12
10
  export {
13
- x as Actions
11
+ f as Actions
14
12
  };
15
13
  //# sourceMappingURL=Actions.js.map