@gusto/embedded-react-sdk 0.11.3 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/CHANGELOG.md +181 -0
  2. package/dist/components/Base/Base.js +18 -19
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +1 -1
  5. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +1 -1
  6. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +1 -1
  7. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
  8. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.module.scss.js +1 -1
  9. package/dist/components/Common/FieldLayout/FieldLayout.module.scss.js +6 -6
  10. package/dist/components/Common/Flex/Flex.d.ts +2 -2
  11. package/dist/components/Common/Flex/Flex.js +5 -5
  12. package/dist/components/Common/Flex/Flex.js.map +1 -1
  13. package/dist/components/Common/Form/Form.module.scss.js +2 -2
  14. package/dist/components/Common/Grid/Grid.d.ts +2 -2
  15. package/dist/components/Common/Grid/Grid.js +13 -13
  16. package/dist/components/Common/Grid/Grid.js.map +1 -1
  17. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.module.scss.js +12 -12
  18. package/dist/components/Common/InternalError/InternalError.module.scss.js +1 -1
  19. package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
  20. package/dist/components/Common/PaginationControl/PaginationControl.module.scss.js +1 -1
  21. package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +15 -15
  22. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  23. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
  24. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  25. package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +6 -6
  26. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
  27. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  28. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
  29. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  30. package/dist/components/Common/UI/Alert/Alert.module.scss.js +1 -1
  31. package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
  32. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  33. package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +1 -1
  34. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +5 -5
  35. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  36. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +8 -8
  37. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.module.scss.js +1 -1
  38. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
  39. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +5 -5
  40. package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
  41. package/dist/components/Common/UI/Link/Link.module.scss.js +1 -1
  42. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  43. package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
  44. package/dist/components/Common/UI/NumberInput/NumberInput.js +36 -38
  45. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  46. package/dist/components/Common/UI/ProgressBar/ProgressBar.d.ts +1 -1
  47. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +19 -9
  48. package/dist/components/Common/UI/ProgressBar/ProgressBar.js.map +1 -1
  49. package/dist/components/Common/UI/ProgressBar/ProgressBar.module.scss.js +1 -1
  50. package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +4 -0
  51. package/dist/components/Common/UI/Radio/Radio.module.scss.js +1 -1
  52. package/dist/components/Common/UI/RadioGroup/RadioGroup.module.scss.js +1 -1
  53. package/dist/components/Common/UI/Select/Select.module.scss.js +1 -1
  54. package/dist/components/Common/UI/Switch/Switch.module.scss.js +4 -4
  55. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  56. package/dist/components/Common/UI/Text/Text.module.scss.js +14 -14
  57. package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
  58. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  60. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
  62. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
  64. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
  65. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
  66. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  67. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  68. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
  69. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  70. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  71. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
  72. package/dist/components/Company/BankAccount/BankAccount.js +6 -6
  73. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  74. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  75. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  76. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +7 -7
  77. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  78. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  79. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  80. package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
  81. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
  82. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  83. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +3 -3
  84. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  85. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
  86. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  87. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  88. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  89. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
  90. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  91. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +6 -7
  92. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  93. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  94. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
  95. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  96. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  97. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  98. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  99. package/dist/components/Company/FederalTaxes/FederalTaxes.js +6 -7
  100. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  101. package/dist/components/Company/FederalTaxes/Form.js +3 -5
  102. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  103. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
  104. package/dist/components/Company/Industry/Actions.js +5 -7
  105. package/dist/components/Company/Industry/Actions.js.map +1 -1
  106. package/dist/components/Company/Industry/Context.js +1 -1
  107. package/dist/components/Company/Industry/Edit.js +10 -12
  108. package/dist/components/Company/Industry/Edit.js.map +1 -1
  109. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
  110. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  111. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  112. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
  113. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  114. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
  115. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  116. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  117. package/dist/components/Company/Locations/LocationsList/List.js +2 -4
  118. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  119. package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -9
  120. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  121. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
  122. package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
  123. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  124. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
  125. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  126. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
  127. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  128. package/dist/components/Company/OnboardingOverview/context.js +1 -1
  129. package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
  130. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  131. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -12
  132. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  133. package/dist/components/Company/PaySchedule/_parts/Edit.js +14 -14
  134. package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +1 -1
  135. package/dist/components/Company/PaySchedule/_parts/Head.js +6 -8
  136. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  137. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  138. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  139. package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
  141. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  142. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +8 -8
  143. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  144. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
  145. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
  146. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  147. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
  148. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  149. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
  150. package/dist/components/Contractor/Address/Address.js +4 -5
  151. package/dist/components/Contractor/Address/Address.js.map +1 -1
  152. package/dist/components/Contractor/Address/Form.js +1 -1
  153. package/dist/components/Contractor/Address/useAddress.js +1 -1
  154. package/dist/components/Contractor/ContractorList/index.d.ts +16 -0
  155. package/dist/components/Contractor/ContractorList/index.js +124 -0
  156. package/dist/components/Contractor/ContractorList/index.js.map +1 -0
  157. package/dist/components/Contractor/{List → ContractorList}/useContractorList.d.ts +1 -3
  158. package/dist/components/Contractor/{List → ContractorList}/useContractorList.js +9 -10
  159. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -0
  160. package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
  161. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  162. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +2 -0
  163. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +26 -0
  164. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -0
  165. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +27 -0
  166. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +91 -0
  167. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -0
  168. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +9 -0
  169. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +137 -0
  170. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -0
  171. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -7
  172. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  173. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  174. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  175. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  176. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  177. package/dist/components/Contractor/Profile/ContractorProfile.js +38 -17
  178. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  179. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +3 -1
  180. package/dist/components/Contractor/Profile/ContractorProfileForm.js +73 -74
  181. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
  182. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +29 -28
  183. package/dist/components/Contractor/Profile/useContractorProfile.js +158 -151
  184. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  185. package/dist/components/Contractor/Submit/Submit.d.ts +7 -0
  186. package/dist/components/Contractor/Submit/Submit.js +76 -0
  187. package/dist/components/Contractor/Submit/Submit.js.map +1 -0
  188. package/dist/components/Contractor/Submit/SubmitDone.js +11 -11
  189. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  190. package/dist/components/Contractor/index.d.ts +3 -2
  191. package/dist/components/Contractor/index.js +10 -8
  192. package/dist/components/Contractor/index.js.map +1 -1
  193. package/dist/components/Employee/Compensation/Actions.js +5 -6
  194. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  195. package/dist/components/Employee/Compensation/Edit.js +14 -15
  196. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  197. package/dist/components/Employee/Compensation/List.js +23 -25
  198. package/dist/components/Employee/Compensation/List.js.map +1 -1
  199. package/dist/components/Employee/Deductions/Deductions.d.ts +8 -14
  200. package/dist/components/Employee/Deductions/Deductions.js +47 -140
  201. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  202. package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +23 -0
  203. package/dist/components/Employee/Deductions/DeductionsComponents.js +31 -0
  204. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -0
  205. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +41 -0
  206. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +134 -0
  207. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -0
  208. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +6 -0
  209. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +98 -0
  210. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -0
  211. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +15 -0
  212. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +48 -0
  213. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -0
  214. package/dist/components/Employee/Deductions/stateMachine.d.ts +7 -0
  215. package/dist/components/Employee/Deductions/stateMachine.js +107 -0
  216. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -0
  217. package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
  218. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  219. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  220. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +6 -7
  221. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  222. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  223. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  224. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  225. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
  226. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  227. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  228. package/dist/components/Employee/EmployeeList/Actions.js +4 -6
  229. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  230. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  231. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  232. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  233. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  234. package/dist/components/Employee/EmployeeList/List.js +14 -15
  235. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  236. package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
  237. package/dist/components/Employee/Landing/Landing.js +12 -13
  238. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  239. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  240. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +6 -6
  241. package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
  242. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  243. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
  244. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  245. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -10
  246. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  247. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
  248. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  249. package/dist/components/Employee/PaymentMethod/Split.js +10 -11
  250. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  251. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  252. package/dist/components/Employee/Profile/Actions.js +7 -9
  253. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  254. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
  255. package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
  256. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  257. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  258. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
  259. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  260. package/dist/components/Employee/Profile/useProfile.js +1 -1
  261. package/dist/components/Employee/Taxes/Actions.js +8 -10
  262. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  263. package/dist/components/Employee/Taxes/FederalForm.js +12 -14
  264. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  265. package/dist/components/Employee/Taxes/useTaxes.js +1 -1
  266. package/dist/components/Flow/Flow.js +15 -13
  267. package/dist/components/Flow/Flow.js.map +1 -1
  268. package/dist/components/Flow/useFlow.d.ts +1 -0
  269. package/dist/components/Flow/useFlow.js.map +1 -1
  270. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
  271. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +41 -0
  272. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
  273. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +11 -0
  274. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +78 -0
  275. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -0
  276. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +6 -0
  277. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +19 -0
  278. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -0
  279. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -0
  280. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +21 -0
  281. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -0
  282. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +6 -0
  283. package/dist/components/Payroll/PayrollList/PayrollList.js +17 -0
  284. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -0
  285. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -0
  286. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +49 -0
  287. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -0
  288. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +7 -0
  289. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +32 -0
  290. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -0
  291. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +6 -0
  292. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +68 -0
  293. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -0
  294. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +16 -0
  295. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +55 -0
  296. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -0
  297. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +6 -0
  298. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +20 -0
  299. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -0
  300. package/dist/components/Payroll/index.d.ts +6 -0
  301. package/dist/components/Payroll/index.js +13 -0
  302. package/dist/components/Payroll/index.js.map +1 -0
  303. package/dist/components/index.d.ts +1 -0
  304. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +3 -3
  305. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +5 -7
  306. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  307. package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +1 -5
  308. package/dist/contexts/ThemeProvider/ThemeProvider.js +18 -60
  309. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  310. package/dist/contexts/ThemeProvider/theme.d.ts +42 -11
  311. package/dist/contexts/ThemeProvider/theme.js +31 -15
  312. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  313. package/dist/helpers/responsive.d.ts +0 -3
  314. package/dist/helpers/responsive.js +20 -34
  315. package/dist/helpers/responsive.js.map +1 -1
  316. package/dist/i18n/I18n.js +1 -1
  317. package/dist/i18n/I18n.js.map +1 -1
  318. package/dist/i18n/en/Contractor.ContractorList.json.js +16 -10
  319. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  320. package/dist/i18n/en/Contractor.Profile.json.js +1 -1
  321. package/dist/i18n/en/Contractor.Submit.json.js +22 -0
  322. package/dist/i18n/en/Contractor.Submit.json.js.map +1 -0
  323. package/dist/i18n/en/Employee.Deductions.json.js +49 -51
  324. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  325. package/dist/index.js +11 -9
  326. package/dist/index.js.map +1 -1
  327. package/dist/shared/constants.d.ts +46 -2
  328. package/dist/shared/constants.js +82 -45
  329. package/dist/shared/constants.js.map +1 -1
  330. package/dist/style.css +1 -1
  331. package/dist/types/i18next.d.ts +27 -17
  332. package/package.json +9 -8
  333. package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js +0 -8
  334. package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js.map +0 -1
  335. package/dist/components/Contractor/List/index.d.ts +0 -25
  336. package/dist/components/Contractor/List/index.js +0 -81
  337. package/dist/components/Contractor/List/index.js.map +0 -1
  338. package/dist/components/Contractor/List/useContractorList.js.map +0 -1
  339. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.d.ts +0 -6
  340. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js +0 -27
  341. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +0 -1
  342. package/dist/components/Contractor/Submit/index.d.ts +0 -6
  343. package/dist/components/Contractor/Submit/index.js +0 -20
  344. package/dist/components/Contractor/Submit/index.js.map +0 -1
  345. package/dist/components/Contractor/Submit/index.module.scss.js +0 -8
  346. package/dist/components/Contractor/Submit/index.module.scss.js.map +0 -1
  347. package/dist/components/Employee/Deductions/Actions.js +0 -27
  348. package/dist/components/Employee/Deductions/Actions.js.map +0 -1
  349. package/dist/components/Employee/Deductions/DeductionForm.d.ts +0 -1
  350. package/dist/components/Employee/Deductions/DeductionForm.js +0 -78
  351. package/dist/components/Employee/Deductions/DeductionForm.js.map +0 -1
  352. package/dist/components/Employee/Deductions/DeductionsList.d.ts +0 -2
  353. package/dist/components/Employee/Deductions/DeductionsList.js +0 -60
  354. package/dist/components/Employee/Deductions/DeductionsList.js.map +0 -1
  355. package/dist/components/Employee/Deductions/Head.js +0 -13
  356. package/dist/components/Employee/Deductions/Head.js.map +0 -1
  357. package/dist/components/Employee/Deductions/IncludeDeductionsForm.d.ts +0 -1
  358. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +0 -27
  359. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +0 -1
  360. package/dist/components/Employee/Deductions/useDeductions.js +0 -33
  361. package/dist/components/Employee/Deductions/useDeductions.js.map +0 -1
  362. package/dist/contexts/ThemeProvider/createTheme.d.ts +0 -21
  363. package/dist/contexts/ThemeProvider/createTheme.js +0 -269
  364. package/dist/contexts/ThemeProvider/createTheme.js.map +0 -1
  365. package/dist/i18n/en/Contractor.ContractorSubmit.json.js +0 -18
  366. package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +0 -1
  367. package/dist/types/GTheme.d.ts +0 -254
  368. /package/dist/contexts/ThemeProvider/{createTheme.test.d.ts → theme.test.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Frequency } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayschedules'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, fieldErrors, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.payScheduleList?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors) {\n // TODO: These error messages are not being localized correctly\n fieldErrors.forEach(error => {\n setError(error.key as keyof PayScheduleInputs, { message: error.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n anchorPayDate: formattedAnchorPayDate,\n anchorEndOfPayPeriod: formattedAnchorEndOfPayPeriod,\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n },\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as Frequency,\n anchorPayDate: schedule.anchorPayDate ? new Date(schedule.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod)\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","fieldErrors","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","useEffect","error","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+BO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,GAAQ,qBAAqB,GAC7BC,GAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,MAAK,WAAAR,GAAsB,eAAAC,GACzB,UAAAE,EAAM,SAAA,CACT,EAAA,CACF,IAIEK,KAAO,CAAC,EAAE,WAAAR,GAAW,UAAAS,GAAU,eAAAR,QAAsC;AACzE,QAAM,EAAE,mBAAAS,GAAmB,SAAAC,GAAS,aAAAC,GAAa,UAAUC,EAAA,IAAiBC,EAAA,GAEtE,EAAE,MAAMC,EAAA,IAAiBC,EAA8B;AAAA,IAC3D,WAAAhB;AAAA,EAAA,CACD,GAEK,CAACiB,GAAMC,CAAO,IAAIC;AAAA,IACtBJ,EAAa,iBAAiB,WAAW,IAAI,qBAAqB;AAAA,EAAA,GAE9D,CAACK,GAAoBC,CAAqB,IAAIF,EAAiC,IAAI,GACnFG,IAA8C;AAAA,IAClD,WAAWrB,GAAe,aA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AC9C,UAAA1C,KAGC,gBAAAqD,EAACC,IAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Frequency } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayschedules'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, fieldErrors, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.payScheduleList?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors) {\n // TODO: These error messages are not being localized correctly\n fieldErrors.forEach(error => {\n setError(error.key as keyof PayScheduleInputs, { message: error.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n anchorPayDate: formattedAnchorPayDate,\n anchorEndOfPayPeriod: formattedAnchorEndOfPayPeriod,\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n },\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as Frequency,\n anchorPayDate: schedule.anchorPayDate ? new Date(schedule.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod)\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","fieldErrors","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","useEffect","error","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,GAAQ,qBAAqB,GAC7BC,GAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,MAAK,WAAAR,GAAsB,eAAAC,GACzB,UAAAE,EAAM,SAAA,CACT,EAAA,CACF,IAIEK,KAAO,CAAC,EAAE,WAAAR,GAAW,UAAAS,GAAU,eAAAR,QAAsC;AACzE,QAAM,EAAE,mBAAAS,GAAmB,SAAAC,GAAS,aAAAC,GAAa,UAAUC,EAAA,IAAiBC,EAAA,GAEtE,EAAE,MAAMC,EAAA,IAAiBC,EAA8B;AAAA,IAC3D,WAAAhB;AAAA,EAAA,CACD,GAEK,CAACiB,GAAMC,CAAO,IAAIC;AAAA,IACtBJ,EAAa,iBAAiB,WAAW,IAAI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K,eAAY,0BAChB,4BAACsD,GAAA,EAAc,GAAGjC,GAChB,UAAA,gBAAArB,EAACuD,GAAA,EAAK,UAAUlC,EAAY,aAAawB,CAAQ,GAC9C,UAAA1C,KAGC,gBAAAqD,EAACC,IAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -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;"}
@@ -6,23 +6,23 @@ import { usePaySchedule as N } from "../usePaySchedule.js";
6
6
  import l from "./Edit.module.scss.js";
7
7
  import { Flex as h } from "../../../Common/Flex/Flex.js";
8
8
  import { Grid as x } from "../../../Common/Grid/Grid.js";
9
- import { RadioGroupField as E } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
- import { TextInputField as O } from "../../../Common/Fields/TextInputField/TextInputField.js";
11
- import { DatePickerField as f } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
9
+ import { useComponentContext as E } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import { useLocale as O } from "../../../../contexts/LocaleProvider/useLocale.js";
11
+ import { formatDateNamedWeekdayShortPlusDate as f } from "../../../../helpers/dateFormatting.js";
12
+ import { TextInputField as R } from "../../../Common/Fields/TextInputField/TextInputField.js";
13
+ import { SelectField as F } from "../../../Common/Fields/SelectField/SelectField.js";
14
+ import { RadioGroupField as M } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
12
15
  import { NumberInputField as P } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
13
- import { useComponentContext as R } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import { useLocale as F } from "../../../../contexts/LocaleProvider/useLocale.js";
15
- import { formatDateNamedWeekdayShortPlusDate as D } from "../../../../helpers/dateFormatting.js";
16
- import { SelectField as M } from "../../../Common/Fields/SelectField/SelectField.js";
16
+ import { DatePickerField as D } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
17
17
  const K = () => {
18
- const o = R(), { t: e } = S("Company.PaySchedule"), { locale: u } = F(), { payPeriodPreview: r, mode: p, payPreviewLoading: v } = N(), { 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";
18
+ const o = E(), { t: e } = S("Company.PaySchedule"), { locale: u } = O(), { payPeriodPreview: r, mode: p, payPreviewLoading: v } = N(), { 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";
19
19
  return T(() => {
20
20
  i === "Twice per month" && n === "1st15th" && (d("day1", 15), d("day2", 31));
21
21
  }, [i, n, d]), p !== "EDIT_PAY_SCHEDULE" && p !== "ADD_PAY_SCHEDULE" ? null : /* @__PURE__ */ t("div", { className: l.payScheduleContainer, children: /* @__PURE__ */ m(x, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
22
22
  /* @__PURE__ */ t("div", { className: l.payScheduleForm, children: /* @__PURE__ */ m(h, { flexDirection: "column", children: [
23
- /* @__PURE__ */ t(O, { name: "customName", label: "Name", isRequired: !0 }),
23
+ /* @__PURE__ */ t(R, { name: "customName", label: "Name", isRequired: !0 }),
24
24
  /* @__PURE__ */ t(
25
- M,
25
+ F,
26
26
  {
27
27
  name: "frequency",
28
28
  label: e("labels.frequency"),
@@ -36,7 +36,7 @@ const K = () => {
36
36
  }
37
37
  ),
38
38
  i === "Twice per month" && /* @__PURE__ */ t(
39
- E,
39
+ M,
40
40
  {
41
41
  name: "customTwicePerMonth",
42
42
  label: e("labels.frequencyOptions"),
@@ -48,7 +48,7 @@ const K = () => {
48
48
  }
49
49
  ),
50
50
  /* @__PURE__ */ t(
51
- f,
51
+ D,
52
52
  {
53
53
  name: "anchorPayDate",
54
54
  label: e("labels.firstPayDate"),
@@ -57,7 +57,7 @@ const K = () => {
57
57
  }
58
58
  ),
59
59
  /* @__PURE__ */ t(
60
- f,
60
+ D,
61
61
  {
62
62
  name: "anchorEndOfPayPeriod",
63
63
  label: e("labels.firstPayPeriodEndDate"),
@@ -76,7 +76,7 @@ const K = () => {
76
76
  isRequired: !0,
77
77
  options: r.map((s, c) => ({
78
78
  value: String(c),
79
- label: `${D(s.startDate, u)} – ${D(s.endDate, u)}`
79
+ label: `${f(s.startDate, u)} – ${f(s.endDate, u)}`
80
80
  })),
81
81
  value: String(a),
82
82
  onChange: (s) => {
@@ -1,4 +1,4 @@
1
- const a = "_payScheduleContainer_15aaq_1", e = "_payScheduleForm_15aaq_5", n = "_visuallyHidden_15aaq_9", l = "_calendarContainer_15aaq_13", d = {
1
+ const a = "_payScheduleContainer_masn5_1", e = "_payScheduleForm_masn5_5", n = "_visuallyHidden_masn5_9", l = "_calendarContainer_masn5_13", d = {
2
2
  payScheduleContainer: a,
3
3
  payScheduleForm: e,
4
4
  visuallyHidden: n,
@@ -1,16 +1,14 @@
1
- import { jsx as e, jsxs as s, Fragment as o } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as r, Fragment as o } from "react/jsx-runtime";
2
2
  import { useTranslation as c, Trans as a } 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();
6
+ const y = () => {
7
+ const { t } = c("Company.PaySchedule"), n = l(), { mode: s } = d();
10
8
  let i = /* @__PURE__ */ e(o, {});
11
- switch (r) {
9
+ switch (s) {
12
10
  case "LIST_PAY_SCHEDULES":
13
- i = /* @__PURE__ */ s(o, { children: [
11
+ i = /* @__PURE__ */ r(o, { children: [
14
12
  /* @__PURE__ */ e(n.Heading, { as: "h2", children: t("headings.pageTitle") }),
15
13
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
16
14
  a,
@@ -44,6 +42,6 @@ const S = () => {
44
42
  return /* @__PURE__ */ e(h, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ e("header", { children: i }) });
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 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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  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 { HamburgerMenu as v } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
11
9
  import { VisuallyHidden as g } from "../../../Common/VisuallyHidden/VisuallyHidden.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(g, { children: r("payScheduleList.active") }),
31
+ title: /* @__PURE__ */ e(g, { 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,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,MAAAC,GAAM,YAAAC,EAAA,IAA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,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,gBAAMG,IAAmBH,EAAS;AAClC,iBACE,gBAAAI,EAACC,GAAA,EAAK,eAAe,UAAU,KAAK,GAClC,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,SACrB,UAAA;AAAA,YAAA,gBAAAH,EAAC,SAAK,UAAAF,EAAA,CAAY;AAAA,YACjBD,KAAW,gBAAAG,EAAC,OAAA,EAAK,UAAAD,EAAA,CAAiB;AAAA,UAAA,EAAA,CACrC,EAAA,CACF;AAAA,QAEJ;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAAlB,EAAE,wBAAwB,GAAE;AAAA,QACpD,KAAK;AAAA,QACL,QAAQ,CAAAU,MACN,gBAAAI,EAACC,GAAA,EAAK,YAAY,UAAU,gBAAgB,UAC1C,UAAA,gBAAAD,EAAC,SAAI,WAAWG,EAAO,SACpB,UAAAP,EAAS,SACR,gBAAAI,EAACZ,EAAW,OAAX,EAAiB,QAAO,WAAW,UAAAF,EAAE,wBAAwB,EAAA,CAAE,IAEhE,gBAAAc,EAACZ,EAAW,OAAX,EAAiB,QAAO,QAAQ,UAAAF,EAAE,0BAA0B,GAAE,GAEnE,EAAA,CACF;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEF,UAAU,CAAAU,MAEN,gBAAAI;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,cAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,OAAOnB,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAM,EAAWI,CAAQ;AAAA,YACrB;AAAA,YACA,MAAM,gBAAAI,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SAAIf,MAAS,uBACJ,OAGF,gBAAAS,EAACO,GAAA,EAAS,OAAM,QAAQ,GAAGb,GAAe;AACnD;"}
@@ -9,9 +9,9 @@ import "@gusto/embedded-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
12
  import "dompurify";
14
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
15
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
16
  const x = o.object({
17
17
  frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
@@ -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;"}
@@ -1,31 +1,31 @@
1
- import { jsxs as m, Fragment as f, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as a, Fragment as f, jsx as o } from "react/jsx-runtime";
2
2
  import { z as t } from "zod";
3
3
  import { useTranslation as u } from "react-i18next";
4
4
  import { useStateTaxesForm as x } from "./context.js";
5
5
  import { QuestionInput as l } from "../../../Common/TaxInputs/TaxInputs.js";
6
6
  import { useLocaleDateFormatter as T } from "../../../../contexts/LocaleProvider/useLocale.js";
7
- import { useComponentContext as h } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
8
  t.record(t.string(), t.record(t.string(), t.unknown()));
9
9
  function w() {
10
- const { t: s } = u("Company.StateTaxes", { keyPrefix: "form" }), i = T(), { stateTaxRequirements: p } = x(), r = h();
10
+ const { t: s } = u("Company.StateTaxes", { keyPrefix: "form" }), i = T(), { stateTaxRequirements: p } = x(), r = y();
11
11
  return p.requirementSets?.map(
12
- ({ requirements: c, label: d, effectiveFrom: n, key: a }) => /* @__PURE__ */ m(f, { children: [
13
- /* @__PURE__ */ m("div", { children: [
12
+ ({ requirements: c, label: d, effectiveFrom: n, key: m }) => /* @__PURE__ */ a(f, { children: [
13
+ /* @__PURE__ */ a("div", { children: [
14
14
  /* @__PURE__ */ o(r.Heading, { as: "h3", children: d }),
15
- n && /* @__PURE__ */ o(r.Text, { className: "lightText", children: s("effectiveFromLabel", { date: i.format(new Date(n)) }) })
15
+ n && /* @__PURE__ */ o(r.Text, { size: "sm", children: s("effectiveFromLabel", { date: i.format(new Date(n)) }) })
16
16
  ] }),
17
17
  c?.map((e) => /* @__PURE__ */ o(
18
18
  l,
19
19
  {
20
20
  requirement: {
21
21
  ...e,
22
- key: `${a}.${e.key}`
22
+ key: `${m}.${e.key}`
23
23
  },
24
24
  questionType: e.metadata?.type ?? "Text"
25
25
  },
26
26
  e.key
27
27
  ))
28
- ] }, a)
28
+ ] }, m)
29
29
  );
30
30
  }
31
31
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { Fragment } from 'react/jsx-runtime'\nimport { useStateTaxesForm } from './context'\nimport { QuestionInput } from '@/components/Common/TaxInputs/TaxInputs'\nimport { useLocaleDateFormatter } from '@/contexts/LocaleProvider/useLocale'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const StateFormSchema = z.record(z.string(), z.record(z.string(), z.unknown()))\n\nexport type StateFormInputs = z.infer<typeof StateFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const dateFormatter = useLocaleDateFormatter()\n const { stateTaxRequirements } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return stateTaxRequirements.requirementSets?.map(\n ({ requirements, label, effectiveFrom, key }) => (\n <Fragment key={key}>\n <div>\n <Components.Heading as=\"h3\">{label}</Components.Heading>\n {effectiveFrom && (\n <Components.Text className=\"lightText\">\n {t('effectiveFromLabel', { date: dateFormatter.format(new Date(effectiveFrom)) })}\n </Components.Text>\n )}\n </div>\n {requirements?.map(requirement => {\n return (\n <QuestionInput\n requirement={{\n ...requirement,\n key: `${key}.${requirement.key as string}`,\n }}\n questionType={requirement.metadata?.type ?? 'Text'}\n key={requirement.key}\n />\n )\n })}\n </Fragment>\n ),\n )\n}\n"],"names":["z","Form","t","useTranslation","dateFormatter","useLocaleDateFormatter","stateTaxRequirements","useStateTaxesForm","Components","useComponentContext","requirements","label","effectiveFrom","key","Fragment","jsxs","jsx","requirement","QuestionInput"],"mappings":";;;;;;;AAQ+BA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,QAAA,CAAS,CAAC;AAI9E,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClEC,IAAgBC,EAAA,GAChB,EAAE,sBAAAC,EAAA,IAAyBC,EAAA,GAC3BC,IAAaC,EAAA;AAEnB,SAAOH,EAAqB,iBAAiB;AAAA,IAC3C,CAAC,EAAE,cAAAI,GAAc,OAAAC,GAAO,eAAAC,GAAe,KAAAC,EAAA,wBACpCC,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC,EAAC,OAAA,EACC,UAAA;AAAA,QAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAG,GAAM;AAAA,QAClCC,KACC,gBAAAI,EAACR,EAAW,MAAX,EAAgB,WAAU,aACxB,UAAAN,EAAE,sBAAsB,EAAE,MAAME,EAAc,OAAO,IAAI,KAAKQ,CAAa,CAAC,EAAA,CAAG,EAAA,CAClF;AAAA,MAAA,GAEJ;AAAA,MACCF,GAAc,IAAI,CAAAO,MAEf,gBAAAD;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,aAAa;AAAA,YACX,GAAGD;AAAA,YACH,KAAK,GAAGJ,CAAG,IAAII,EAAY,GAAa;AAAA,UAAA;AAAA,UAE1C,cAAcA,EAAY,UAAU,QAAQ;AAAA,QAAA;AAAA,QACvCA,EAAY;AAAA,MAAA,CAGtB;AAAA,IAAA,EAAA,GApBYJ,CAqBf;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { Fragment } from 'react/jsx-runtime'\nimport { useStateTaxesForm } from './context'\nimport { QuestionInput } from '@/components/Common/TaxInputs/TaxInputs'\nimport { useLocaleDateFormatter } from '@/contexts/LocaleProvider/useLocale'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const StateFormSchema = z.record(z.string(), z.record(z.string(), z.unknown()))\n\nexport type StateFormInputs = z.infer<typeof StateFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const dateFormatter = useLocaleDateFormatter()\n const { stateTaxRequirements } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return stateTaxRequirements.requirementSets?.map(\n ({ requirements, label, effectiveFrom, key }) => (\n <Fragment key={key}>\n <div>\n <Components.Heading as=\"h3\">{label}</Components.Heading>\n {effectiveFrom && (\n <Components.Text size=\"sm\">\n {t('effectiveFromLabel', { date: dateFormatter.format(new Date(effectiveFrom)) })}\n </Components.Text>\n )}\n </div>\n {requirements?.map(requirement => {\n return (\n <QuestionInput\n requirement={{\n ...requirement,\n key: `${key}.${requirement.key as string}`,\n }}\n questionType={requirement.metadata?.type ?? 'Text'}\n key={requirement.key}\n />\n )\n })}\n </Fragment>\n ),\n )\n}\n"],"names":["z","Form","t","useTranslation","dateFormatter","useLocaleDateFormatter","stateTaxRequirements","useStateTaxesForm","Components","useComponentContext","requirements","label","effectiveFrom","key","Fragment","jsxs","jsx","requirement","QuestionInput"],"mappings":";;;;;;;AAQ+BA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,QAAA,CAAS,CAAC;AAI9E,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClEC,IAAgBC,EAAA,GAChB,EAAE,sBAAAC,EAAA,IAAyBC,EAAA,GAC3BC,IAAaC,EAAA;AAEnB,SAAOH,EAAqB,iBAAiB;AAAA,IAC3C,CAAC,EAAE,cAAAI,GAAc,OAAAC,GAAO,eAAAC,GAAe,KAAAC,EAAA,wBACpCC,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC,EAAC,OAAA,EACC,UAAA;AAAA,QAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAG,GAAM;AAAA,QAClCC,KACC,gBAAAI,EAACR,EAAW,MAAX,EAAgB,MAAK,MACnB,UAAAN,EAAE,sBAAsB,EAAE,MAAME,EAAc,OAAO,IAAI,KAAKQ,CAAa,CAAC,EAAA,CAAG,EAAA,CAClF;AAAA,MAAA,GAEJ;AAAA,MACCF,GAAc,IAAI,CAAAO,MAEf,gBAAAD;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,aAAa;AAAA,YACX,GAAGD;AAAA,YACH,KAAK,GAAGJ,CAAG,IAAII,EAAY,GAAa;AAAA,UAAA;AAAA,UAE1C,cAAcA,EAAY,UAAU,QAAQ;AAAA,QAAA;AAAA,QACvCA,EAAY;AAAA,MAAA,CAGtB;AAAA,IAAA,EAAA,GApBYJ,CAqBf;AAAA,EAAA;AAGN;"}
@@ -8,9 +8,9 @@ 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
11
  import "dompurify";
13
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
15
  const [c, d] = t("StateTaxesFormContext");
16
16
  export {
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
@@ -1,15 +1,13 @@
1
1
  import { jsx as s, Fragment as p } from "react/jsx-runtime";
2
2
  import { useTranslation as o } from "react-i18next";
3
3
  import { useStateTaxesList as l } from "./context.js";
4
- import "classnames";
5
- import "../../../../shared/constants.js";
6
4
  import { EmptyData as c } from "../../../Common/EmptyData/EmptyData.js";
7
5
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
6
  import { useDataView as d } from "../../../Common/DataView/useDataView.js";
9
7
  import { DataView as C } from "../../../Common/DataView/DataView.js";
10
- const b = () => {
11
- const { stateTaxRequirements: r, handleChange: n } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
12
- data: r,
8
+ const S = () => {
9
+ const { stateTaxRequirements: n, handleChange: r } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
10
+ data: n,
13
11
  columns: [
14
12
  {
15
13
  key: "state",
@@ -27,7 +25,7 @@ const b = () => {
27
25
  {
28
26
  variant: "secondary",
29
27
  onClick: () => {
30
- n(e.state);
28
+ r(e.state);
31
29
  },
32
30
  children: e.setupComplete ? t("editStateTaxCta") : t("continueStateTaxSetupCta")
33
31
  }
@@ -37,6 +35,6 @@ const b = () => {
37
35
  return /* @__PURE__ */ s(C, { label: t("requirementsListLabel"), ...m });
38
36
  };
39
37
  export {
40
- b as List
38
+ S as List
41
39
  };
42
40
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAKtF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA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