@gusto/embedded-react-sdk 0.37.0-rc.5 → 0.38.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/UNSTABLE_Hooks.d.ts +1 -1
  3. package/dist/UNSTABLE_Hooks.js +34 -38
  4. package/dist/UNSTABLE_Hooks.js.map +1 -1
  5. package/dist/assets/icons/filter-funnel.svg.js +10 -0
  6. package/dist/assets/icons/filter-funnel.svg.js.map +1 -0
  7. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  8. package/dist/components/Common/DataView/DataTable/DataTable.js +77 -68
  9. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  10. package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +17 -0
  11. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +100 -0
  12. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -0
  13. package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +10 -0
  14. package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -0
  15. package/dist/components/Common/DetailViewLayout/DetailViewLayout.d.ts +2 -0
  16. package/dist/components/Common/DetailViewLayout/DetailViewLayoutTypes.d.ts +40 -0
  17. package/dist/components/Common/DetailViewLayout/index.d.ts +3 -0
  18. package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
  19. package/dist/components/Common/EmptyData/EmptyData.js +15 -13
  20. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  21. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
  22. package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
  23. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +21 -20
  24. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  25. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +5 -0
  26. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -1
  27. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +10 -8
  28. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
  29. package/dist/components/Common/SignatureForm/SignatureFormActions.js +7 -8
  30. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  31. package/dist/components/Common/SignatureForm/SignatureFormFields.js +4 -5
  32. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  33. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +18 -18
  34. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
  35. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +5 -0
  36. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
  37. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.d.ts +2 -0
  38. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +74 -0
  39. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -0
  40. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +30 -0
  41. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js.map +1 -0
  42. package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +14 -0
  43. package/dist/components/Common/UI/DateRangePicker/index.d.ts +2 -0
  44. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  45. package/dist/components/Common/UI/Heading/Heading.d.ts +1 -1
  46. package/dist/components/Common/UI/Heading/Heading.js +11 -9
  47. package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
  48. package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -1
  49. package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
  50. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  51. package/dist/components/Common/index.d.ts +2 -0
  52. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  53. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  54. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  55. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  56. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  57. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  59. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  60. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  61. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  62. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  63. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  64. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  65. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  66. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  67. package/dist/components/Company/Industry/Actions.js +5 -6
  68. package/dist/components/Company/Industry/Actions.js.map +1 -1
  69. package/dist/components/Company/Industry/Edit.js +10 -11
  70. package/dist/components/Company/Industry/Edit.js.map +1 -1
  71. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  72. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  73. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  74. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  75. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  76. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  77. package/dist/components/Company/PaySchedule/PaySchedule.js +62 -61
  78. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  79. package/dist/components/Company/PaySchedule/_parts/Actions.js +16 -17
  80. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  81. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  82. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  83. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +2 -1
  84. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  85. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  86. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  87. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  88. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  89. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  90. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  91. package/dist/components/Contractor/Address/Form.js +4 -4
  92. package/dist/components/Contractor/ContractorList/index.js +41 -41
  93. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  94. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  95. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  96. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +135 -126
  97. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  98. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
  99. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +36 -33
  100. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  101. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
  102. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  103. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
  104. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  105. package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
  106. package/dist/components/Contractor/Profile/useContractorProfile.js +20 -18
  107. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  108. package/dist/components/Contractor/Submit/Submit.d.ts +2 -2
  109. package/dist/components/Contractor/Submit/Submit.js +45 -45
  110. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  111. package/dist/components/Employee/Compensation/Actions.js +1 -1
  112. package/dist/components/Employee/Compensation/Compensation.js +49 -49
  113. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  114. package/dist/components/Employee/Compensation/List.js +5 -6
  115. package/dist/components/Employee/Compensation/List.js.map +1 -1
  116. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  117. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  118. package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +2 -5
  119. package/dist/components/Employee/EmployeeList/EmployeeList.js +45 -91
  120. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  121. package/dist/components/Employee/EmployeeList/EmployeeListView.d.ts +15 -0
  122. package/dist/components/Employee/EmployeeList/EmployeeListView.js +130 -0
  123. package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +1 -0
  124. package/dist/components/Employee/EmployeeList/ManagementEmployeeList.d.ts +9 -0
  125. package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js +81 -0
  126. package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +1 -0
  127. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.d.ts +17 -0
  128. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js +193 -0
  129. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +1 -0
  130. package/dist/components/Employee/EmployeeList/index.d.ts +3 -0
  131. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +36 -23
  132. package/dist/components/Employee/EmployeeList/useEmployeeList.js +114 -17
  133. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  134. package/dist/components/Employee/FederalTaxes/Actions.js +2 -3
  135. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  136. package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -5
  137. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  138. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +4 -4
  139. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  140. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
  141. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
  142. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  143. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +10 -11
  144. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  145. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  146. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  147. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -8
  148. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  149. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +44 -43
  150. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  151. package/dist/components/Employee/PaymentMethod/Split.js +1 -1
  152. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
  153. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  154. package/dist/components/Employee/Profile/Actions.js +6 -7
  155. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  156. package/dist/components/Employee/Profile/AdminPersonalDetails.js +4 -5
  157. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  158. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  159. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  160. package/dist/components/Employee/StateTaxes/Actions.js +6 -7
  161. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  162. package/dist/components/Employee/Taxes/Actions.js +7 -8
  163. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  164. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  165. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  166. package/dist/components/Employee/index.d.ts +1 -0
  167. package/dist/components/Employee/index.js +38 -36
  168. package/dist/components/Employee/index.js.map +1 -1
  169. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  170. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +30 -25
  171. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  172. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +74 -69
  173. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  174. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +10 -11
  175. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  176. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
  177. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +19 -19
  178. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
  179. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
  180. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
  181. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
  182. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +0 -1
  183. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  184. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +2 -3
  185. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  186. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +192 -186
  187. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  188. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -1
  189. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +102 -76
  190. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  191. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +155 -156
  192. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  193. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +7 -7
  194. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +11 -0
  195. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +56 -21
  196. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  197. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +40 -40
  198. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  199. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +65 -54
  200. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  201. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  202. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  203. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +35 -14
  204. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
  205. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +80 -69
  206. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  207. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -1
  208. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +59 -66
  209. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  210. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +5 -4
  211. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +93 -100
  212. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  213. package/dist/components/Payroll/PayrollList/PayrollList.js +98 -68
  214. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  215. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -1
  216. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +223 -121
  217. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  218. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +16 -12
  219. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  220. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +101 -100
  221. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  222. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  223. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +187 -178
  224. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  225. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
  226. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  227. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +1 -1
  228. package/dist/components/Payroll/Transition/TransitionFlow.js +29 -27
  229. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  230. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -0
  231. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  232. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
  233. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  234. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
  235. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
  236. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
  237. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +1 -1
  238. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +3 -3
  239. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -1
  240. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +1 -1
  241. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -1
  242. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +1 -2
  243. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -1
  244. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.d.ts +48 -0
  245. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js +94 -0
  246. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +1 -0
  247. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +1 -1
  248. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -1
  249. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +1 -2
  250. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +8 -9
  251. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
  252. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +1 -2
  253. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -1
  254. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +1 -2
  255. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +11 -12
  256. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
  257. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +1 -2
  258. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +2 -3
  259. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
  260. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +1 -2
  261. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +7 -8
  262. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
  263. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +1 -2
  264. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +8 -9
  265. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
  266. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +4 -5
  267. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +12 -13
  268. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
  269. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +1 -1
  270. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -1
  271. package/dist/components/UNSTABLE_Hooks/form/index.d.ts +3 -2
  272. package/dist/components/UNSTABLE_Hooks/form/preprocessors.d.ts +3 -0
  273. package/dist/components/UNSTABLE_Hooks/form/preprocessors.js +15 -0
  274. package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +1 -0
  275. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +2 -2
  276. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -1
  277. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.d.ts +17 -0
  278. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +21 -0
  279. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +1 -0
  280. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +1 -1
  281. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
  282. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +2 -3
  283. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -1
  284. package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +1 -1
  285. package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -1
  286. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +5 -5
  287. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -1
  288. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +48 -42
  289. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +73 -101
  290. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
  291. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchemaParity.test.d.ts +1 -0
  292. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +2 -2
  293. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -1
  294. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +2 -2
  295. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +13 -15
  296. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +109 -110
  297. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
  298. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +2 -2
  299. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -1
  300. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
  301. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +31 -25
  302. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
  303. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +5 -4
  304. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -1
  305. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +1 -1
  306. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +8 -22
  307. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +81 -84
  308. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
  309. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +1 -1
  310. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +1 -1
  311. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -1
  312. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +1 -1
  313. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +9 -10
  314. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +85 -83
  315. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  316. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +8 -4
  317. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +18 -17
  318. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -1
  319. package/dist/components/UNSTABLE_Hooks/index.d.ts +7 -7
  320. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +5 -0
  321. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +46 -0
  322. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
  323. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +5 -0
  324. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +46 -0
  325. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
  326. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +5 -0
  327. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +88 -0
  328. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
  329. package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.d.ts +6 -0
  330. package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js +50 -0
  331. package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js.map +1 -0
  332. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +5 -0
  333. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +73 -0
  334. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -0
  335. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
  336. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +122 -0
  337. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
  338. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
  339. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
  340. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
  341. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.d.ts +5 -0
  342. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +46 -0
  343. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +1 -0
  344. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +5 -0
  345. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.d.ts +2 -0
  346. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js +25 -0
  347. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
  348. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +29 -0
  349. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +103 -0
  350. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
  351. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/index.d.ts +3 -0
  352. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +14 -0
  353. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +290 -0
  354. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
  355. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts +1 -0
  356. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.d.ts +2 -0
  357. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.js +55 -0
  358. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.js.map +1 -0
  359. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysTypes.d.ts +25 -0
  360. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/index.d.ts +3 -0
  361. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.d.ts +7 -0
  362. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.js +27 -0
  363. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.js.map +1 -0
  364. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.d.ts +2 -0
  365. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.js +66 -0
  366. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.js.map +1 -0
  367. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypeTypes.d.ts +6 -0
  368. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/index.d.ts +5 -0
  369. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
  370. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTableTypes.d.ts +26 -0
  371. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/index.d.ts +4 -0
  372. package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +5 -0
  373. package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +35 -0
  374. package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
  375. package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +5 -0
  376. package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +35 -0
  377. package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
  378. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +5 -0
  379. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +35 -0
  380. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +1 -0
  381. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +5 -0
  382. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +35 -0
  383. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +1 -0
  384. package/dist/components/UNSTABLE_TimeOff/index.d.ts +25 -0
  385. package/dist/components/UNSTABLE_TimeOff/index.js +27 -0
  386. package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -0
  387. package/dist/components/index.d.ts +1 -0
  388. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
  389. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  390. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  391. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  392. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  393. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  394. package/dist/helpers/breadcrumbHelpers.d.ts +14 -0
  395. package/dist/helpers/breadcrumbHelpers.js +35 -26
  396. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  397. package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.d.ts +1 -1
  398. package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.js +1 -1
  399. package/dist/helpers/collectErrors.js.map +1 -0
  400. package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
  401. package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
  402. package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
  403. package/dist/hooks/useCompanyPaymentSpeed.test.d.ts +1 -0
  404. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +20 -0
  405. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +38 -0
  406. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -0
  407. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.test.d.ts +1 -0
  408. package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.d.ts +2 -2
  409. package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.js +1 -1
  410. package/dist/hooks/useErrorHandling.js.map +1 -0
  411. package/dist/hooks/useErrorHandling.test.d.ts +1 -0
  412. package/dist/hooks/usePagination/usePagination.d.ts +2 -0
  413. package/dist/hooks/usePagination/usePagination.js +32 -29
  414. package/dist/hooks/usePagination/usePagination.js.map +1 -1
  415. package/dist/i18n/I18n.js +15 -15
  416. package/dist/i18n/I18n.js.map +1 -1
  417. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +10 -12
  418. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
  419. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +32 -0
  420. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -0
  421. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +14 -12
  422. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -1
  423. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
  424. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
  425. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +32 -26
  426. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
  427. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +10 -10
  428. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -34
  429. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  430. package/dist/i18n/en/Employee.EmployeeList.json.js +22 -20
  431. package/dist/i18n/en/Employee.EmployeeList.json.js.map +1 -1
  432. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +40 -0
  433. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -0
  434. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
  435. package/dist/i18n/en/Payroll.PayrollHistory.json.js +12 -12
  436. package/dist/i18n/en/Payroll.PayrollList.json.js +28 -20
  437. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  438. package/dist/i18n/en/Payroll.PayrollOverview.json.js +30 -28
  439. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  440. package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
  441. package/dist/index.js +18 -16
  442. package/dist/index.js.map +1 -1
  443. package/dist/shared/constants.d.ts +46 -0
  444. package/dist/shared/constants.js +99 -74
  445. package/dist/shared/constants.js.map +1 -1
  446. package/dist/style.css +1 -1
  447. package/dist/types/i18next.d.ts +114 -51
  448. package/dist/{components/UNSTABLE_Hooks/types.d.ts → types/sdkHooks.d.ts} +28 -2
  449. package/docs/reference/endpoint-inventory.json +606 -425
  450. package/package.json +27 -18
  451. package/dist/components/Employee/EmployeeList/Actions.d.ts +0 -1
  452. package/dist/components/Employee/EmployeeList/Actions.js +0 -14
  453. package/dist/components/Employee/EmployeeList/Actions.js.map +0 -1
  454. package/dist/components/Employee/EmployeeList/Head.d.ts +0 -1
  455. package/dist/components/Employee/EmployeeList/Head.js +0 -12
  456. package/dist/components/Employee/EmployeeList/Head.js.map +0 -1
  457. package/dist/components/Employee/EmployeeList/List.d.ts +0 -2
  458. package/dist/components/Employee/EmployeeList/List.js +0 -124
  459. package/dist/components/Employee/EmployeeList/List.js.map +0 -1
  460. package/dist/components/Employee/EmployeeList/List.module.scss.js +0 -8
  461. package/dist/components/Employee/EmployeeList/List.module.scss.js.map +0 -1
  462. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js +0 -8
  463. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js.map +0 -1
  464. package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +0 -1
  465. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
  466. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
  467. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
  468. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
  469. package/dist/components/UNSTABLE_Hooks/form/types.d.ts +0 -27
  470. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
  471. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -8
  472. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
  473. package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +0 -1
  474. package/dist/helpers/requiredIf.js +0 -8
  475. package/dist/helpers/requiredIf.js.map +0 -1
  476. /package/dist/components/UNSTABLE_Hooks/{useErrorHandling.test.d.ts → form/buildFormSchema.test.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAA,IAAmBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,gBAAgB,EAAA,CACrB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAA,IAAmBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,gBAAgB,EAAA,CACrB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
@@ -2,7 +2,6 @@ import { jsx as t, Fragment as r, jsxs as n } from "react/jsx-runtime";
2
2
  import { useTranslation as P } from "react-i18next";
3
3
  import { useLocationsList as y } from "./useLocationsList.js";
4
4
  import b from "../../../../assets/icons/pencil.svg.js";
5
- import "../../../../shared/constants.js";
6
5
  import { EmptyData as x } from "../../../Common/EmptyData/EmptyData.js";
7
6
  import { useComponentContext as T } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
7
  import { getStreet as v, getCityStateZip as A } from "../../../../helpers/formattedStrings.js";
@@ -10,7 +9,7 @@ import { VisuallyHidden as k } from "../../../Common/VisuallyHidden/VisuallyHidd
10
9
  import { HamburgerMenu as D } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
11
10
  import { useDataView as S } from "../../../Common/DataView/useDataView.js";
12
11
  import { DataView as V } from "../../../Common/DataView/DataView.js";
13
- const G = () => {
12
+ const q = () => {
14
13
  const a = T(), {
15
14
  locationList: o,
16
15
  handleEditLocation: s,
@@ -19,8 +18,8 @@ const G = () => {
19
18
  totalCount: m,
20
19
  handleFirstPage: c,
21
20
  handleItemsPerPageChange: g,
22
- handleLastPage: p,
23
- handleNextPage: u,
21
+ handleLastPage: u,
22
+ handleNextPage: p,
24
23
  handlePreviousPage: h,
25
24
  handleAddLocation: f,
26
25
  itemsPerPage: L
@@ -65,9 +64,9 @@ const G = () => {
65
64
  }
66
65
  ),
67
66
  pagination: {
68
- handleNextPage: u,
67
+ handleNextPage: p,
69
68
  handleFirstPage: c,
70
- handleLastPage: p,
69
+ handleLastPage: u,
71
70
  handlePreviousPage: h,
72
71
  handleItemsPerPageChange: g,
73
72
  currentPage: d,
@@ -80,6 +79,6 @@ const G = () => {
80
79
  return /* @__PURE__ */ t(V, { label: e("locationListLabel"), ...C });
81
80
  };
82
81
  export {
83
- G as List
82
+ q as List
84
83
  };
85
84
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n totalCount,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n itemsPerPage,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"div\">{getStreet(location)}</Components.Text>\n <Components.Text as=\"div\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n totalCount,\n itemsPerPage,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","totalCount","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","itemsPerPage","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,IACEC,EA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AACO,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAL;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAO;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAO,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAACpB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASY,GAC7C,UAAAG,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n totalCount,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n itemsPerPage,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"div\">{getStreet(location)}</Components.Text>\n <Components.Text as=\"div\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n totalCount,\n itemsPerPage,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","totalCount","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","itemsPerPage","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GAC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AEJ;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAI,MAEN,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAZ,EAAmBgB,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAL;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAO;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAO,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAACpB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASY,GAC7C,UAAAG,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
@@ -1,36 +1,36 @@
1
1
  import { jsx as a, jsxs as k } from "react/jsx-runtime";
2
- import { useForm as z, FormProvider as K } from "react-hook-form";
3
- import { zodResolver as J } from "@hookform/resolvers/zod";
4
- import { useState as A, useEffect as _ } from "react";
5
- import { usePaySchedulesGetPreview as Q } from "@gusto/embedded-api/react-query/paySchedulesGetPreview";
6
- import { usePaySchedulesUpdateMutation as W } from "@gusto/embedded-api/react-query/paySchedulesUpdate";
7
- import { usePaySchedulesGetAllSuspense as X } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
8
- import { usePaySchedulesCreateMutation as Z } from "@gusto/embedded-api/react-query/paySchedulesCreate";
9
- import { usePaymentConfigsGet as $ } from "@gusto/embedded-api/react-query/paymentConfigsGet";
10
- import { PayScheduleSchema as V, PayScheduleProvider as ee } from "./usePaySchedule.js";
11
- import { Form as oe } from "../../Common/Form/Form.js";
12
- import { BaseComponent as re } from "../../Base/Base.js";
13
- import { useBase as te } from "../../Base/useBase.js";
14
- import { Flex as ae } from "../../Common/Flex/Flex.js";
15
- import { useI18n as ne, useComponentDictionary as ce } from "../../../i18n/I18n.js";
2
+ import { useForm as z, FormProvider as G } from "react-hook-form";
3
+ import { zodResolver as K } from "@hookform/resolvers/zod";
4
+ import { useState as C, useEffect as w } from "react";
5
+ import { usePaySchedulesGetPreview as J } from "@gusto/embedded-api/react-query/paySchedulesGetPreview";
6
+ import { usePaySchedulesUpdateMutation as Q } from "@gusto/embedded-api/react-query/paySchedulesUpdate";
7
+ import { usePaySchedulesGetAllSuspense as W } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
8
+ import { usePaySchedulesCreateMutation as X } from "@gusto/embedded-api/react-query/paySchedulesCreate";
9
+ import { PayScheduleSchema as Z, PayScheduleProvider as $ } from "./usePaySchedule.js";
10
+ import { useCompanyPaymentSpeed as V } from "../../../hooks/useCompanyPaymentSpeed.js";
11
+ import { Form as ee } from "../../Common/Form/Form.js";
12
+ import { BaseComponent as oe } from "../../Base/Base.js";
13
+ import { useBase as re } from "../../Base/useBase.js";
14
+ import { Flex as te } from "../../Common/Flex/Flex.js";
15
+ import { useI18n as ae, useComponentDictionary as ne } from "../../../i18n/I18n.js";
16
16
  import { componentEvents as S } from "../../../shared/constants.js";
17
- import { formatDateToStringDate as p } from "../../../helpers/dateFormatting.js";
18
- import { normalizeErrorKeyForForm as ie } from "../../../helpers/formattedStrings.js";
19
- import { Head as de } from "./_parts/Head.js";
20
- import { List as se } from "./_parts/List.js";
21
- import { Edit as me } from "./_parts/Edit.js";
22
- import { Actions as ye } from "./_parts/Actions.js";
23
- const Ne = ({
17
+ import { formatDateToStringDate as l } from "../../../helpers/dateFormatting.js";
18
+ import { normalizeErrorKeyForForm as ce } from "../../../helpers/formattedStrings.js";
19
+ import { Head as ie } from "./_parts/Head.js";
20
+ import { List as de } from "./_parts/List.js";
21
+ import { Edit as se } from "./_parts/Edit.js";
22
+ import { Actions as me } from "./_parts/Actions.js";
23
+ const ge = ({
24
24
  companyId: n,
25
25
  defaultValues: s,
26
26
  dictionary: t,
27
27
  ...m
28
- }) => (ne("Company.PaySchedule"), ce("Company.PaySchedule", t), /* @__PURE__ */ a(re, { ...m, children: /* @__PURE__ */ a(Pe, { companyId: n, defaultValues: s, children: m.children }) })), Pe = ({ companyId: n, children: s, defaultValues: t }) => {
29
- const { baseSubmitHandler: m, onEvent: h, error: C, setError: w } = te(), { data: l } = X({
28
+ }) => (ae("Company.PaySchedule"), ne("Company.PaySchedule", t), /* @__PURE__ */ a(oe, { ...m, children: /* @__PURE__ */ a(ye, { companyId: n, defaultValues: s, children: m.children }) })), ye = ({ companyId: n, children: s, defaultValues: t }) => {
29
+ const { baseSubmitHandler: m, onEvent: h, error: L, setError: q } = re(), { data: p } = W({
30
30
  companyId: n
31
- }), { data: L } = $({ companyUuid: n }), q = L?.paymentConfigs?.paymentSpeed, [i, y] = A(
32
- l.payScheduleList?.length === 0 ? "ADD_PAY_SCHEDULE" : "LIST_PAY_SCHEDULES"
33
- ), [f, T] = A(null), O = {
31
+ }), { paymentSpeedDays: T } = V(n), [i, y] = C(
32
+ p.payScheduleList?.length === 0 ? "ADD_PAY_SCHEDULE" : "LIST_PAY_SCHEDULES"
33
+ ), [f, O] = C(null), H = {
34
34
  frequency: t?.frequency ?? "Every week",
35
35
  anchorPayDate: t?.anchorPayDate ? new Date(t.anchorPayDate) : void 0,
36
36
  anchorEndOfPayPeriod: t?.anchorEndOfPayPeriod ? new Date(t.anchorEndOfPayPeriod) : void 0,
@@ -38,22 +38,22 @@ const Ne = ({
38
38
  day2: t?.day2 ?? void 0,
39
39
  customName: t?.customName ?? "",
40
40
  customTwicePerMonth: "false"
41
- }, U = Z(), H = W(), E = z({
42
- resolver: J(V),
43
- defaultValues: O
44
- }), { watch: Y, setValue: D, reset: d, clearErrors: M, setError: v } = E, P = C?.fieldErrors;
45
- _(() => {
41
+ }, v = X(), A = Q(), E = z({
42
+ resolver: K(Z),
43
+ defaultValues: H
44
+ }), { watch: U, setValue: D, reset: d, clearErrors: Y, setError: _ } = E, P = L?.fieldErrors;
45
+ w(() => {
46
46
  P && P.length > 0 && P.forEach((o) => {
47
- const r = ie(o.field);
48
- v(r, { message: o.message });
47
+ const r = ce(o.field);
48
+ _(r, { message: o.message });
49
49
  });
50
- }, [v, P]);
51
- const e = Y(), g = e.anchorPayDate && p(e.anchorPayDate) || "", N = e.anchorEndOfPayPeriod && p(e.anchorEndOfPayPeriod) || "", { data: b, isLoading: B } = Q(
50
+ }, [_, P]);
51
+ const e = U(), M = e.anchorPayDate && l(e.anchorPayDate) || "", g = e.anchorEndOfPayPeriod && l(e.anchorEndOfPayPeriod) || "", { data: N, isLoading: b } = J(
52
52
  {
53
53
  companyId: n,
54
54
  frequency: e.frequency,
55
- anchorPayDate: g,
56
- anchorEndOfPayPeriod: N,
55
+ anchorPayDate: M,
56
+ anchorEndOfPayPeriod: g,
57
57
  day1: e.day1 ?? void 0,
58
58
  day2: e.day2 ?? void 0
59
59
  },
@@ -61,14 +61,14 @@ const Ne = ({
61
61
  enabled: !!(e.anchorPayDate && e.anchorEndOfPayPeriod && (i === "ADD_PAY_SCHEDULE" || i === "EDIT_PAY_SCHEDULE"))
62
62
  }
63
63
  );
64
- _(() => {
64
+ w(() => {
65
65
  e.frequency === "Twice per month" && e.day1 === 15 && e.day2 === 31 && e.customTwicePerMonth === void 0 ? D("customTwicePerMonth", "1st15th") : e.frequency === "Twice per month" && e.customTwicePerMonth === void 0 && D("customTwicePerMonth", "custom");
66
66
  }, [e.frequency, e.day1, e.day2, D, e.customTwicePerMonth]);
67
- const F = () => {
67
+ const B = () => {
68
68
  y("ADD_PAY_SCHEDULE"), d({});
69
- }, x = () => {
70
- y("LIST_PAY_SCHEDULES"), d({}), M(), w(null);
71
- }, R = (o) => {
69
+ }, F = () => {
70
+ y("LIST_PAY_SCHEDULES"), d({}), Y(), q(null);
71
+ }, x = (o) => {
72
72
  d({
73
73
  frequency: o.frequency,
74
74
  anchorPayDate: o.anchorPayDate ? new Date(o.anchorPayDate) : void 0,
@@ -76,14 +76,14 @@ const Ne = ({
76
76
  day1: o.day1 ?? void 0,
77
77
  day2: o.day2 ?? void 0,
78
78
  customName: o.customName ?? ""
79
- }), T(o), y("EDIT_PAY_SCHEDULE");
80
- }, j = () => {
79
+ }), O(o), y("EDIT_PAY_SCHEDULE");
80
+ }, R = () => {
81
81
  h(S.PAY_SCHEDULE_DONE);
82
- }, G = async (o) => {
82
+ }, j = async (o) => {
83
83
  await m(o, async (r) => {
84
- const u = (c) => c && p(c) || "";
84
+ const u = (c) => c && l(c) || "";
85
85
  if (i === "ADD_PAY_SCHEDULE") {
86
- const c = await U.mutateAsync({
86
+ const c = await v.mutateAsync({
87
87
  request: {
88
88
  companyId: n,
89
89
  requestBody: {
@@ -98,7 +98,7 @@ const Ne = ({
98
98
  });
99
99
  h(S.PAY_SCHEDULE_CREATED, c), d();
100
100
  } else if (i === "EDIT_PAY_SCHEDULE") {
101
- const c = f?.version, I = await H.mutateAsync({
101
+ const c = f?.version, I = await A.mutateAsync({
102
102
  request: {
103
103
  payScheduleId: f?.uuid,
104
104
  companyId: n,
@@ -119,31 +119,32 @@ const Ne = ({
119
119
  });
120
120
  };
121
121
  return /* @__PURE__ */ a(
122
- ee,
122
+ $,
123
123
  {
124
124
  value: {
125
125
  companyId: n,
126
- handleAdd: F,
127
- handleEdit: R,
128
- handleCancel: x,
129
- handleContinue: j,
126
+ handleAdd: B,
127
+ handleEdit: x,
128
+ handleCancel: F,
129
+ handleContinue: R,
130
130
  mode: i,
131
- paySchedules: l.payScheduleList,
132
- payPeriodPreview: b?.object?.payPeriods,
133
- payPreviewLoading: B,
131
+ isPending: v.isPending || A.isPending,
132
+ paySchedules: p.payScheduleList,
133
+ payPeriodPreview: N?.object?.payPeriods,
134
+ payPreviewLoading: b,
134
135
  currentPaySchedule: f,
135
- paymentSpeed: q
136
+ paymentSpeedDays: T
136
137
  },
137
- children: /* @__PURE__ */ a("span", { "data-testid": "pay-schedule-edit-form", children: /* @__PURE__ */ a(K, { ...E, children: /* @__PURE__ */ a(oe, { onSubmit: E.handleSubmit(G), children: s || /* @__PURE__ */ k(ae, { flexDirection: "column", children: [
138
+ children: /* @__PURE__ */ a("span", { "data-testid": "pay-schedule-edit-form", children: /* @__PURE__ */ a(G, { ...E, children: /* @__PURE__ */ a(ee, { onSubmit: E.handleSubmit(j), children: s || /* @__PURE__ */ k(te, { flexDirection: "column", children: [
139
+ /* @__PURE__ */ a(ie, {}),
138
140
  /* @__PURE__ */ a(de, {}),
139
141
  /* @__PURE__ */ a(se, {}),
140
- /* @__PURE__ */ a(me, {}),
141
- /* @__PURE__ */ a(ye, {})
142
+ /* @__PURE__ */ a(me, {})
142
143
  ] }) }) }) })
143
144
  }
144
145
  );
145
146
  };
146
147
  export {
147
- Ne as PaySchedule
148
+ ge as PaySchedule
148
149
  };
149
150
  //# sourceMappingURL=PaySchedule.js.map
@@ -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 { usePaymentConfigsGet } from '@gusto/embedded-api/react-query/paymentConfigsGet'\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 { normalizeErrorKeyForForm } from '@/helpers/formattedStrings'\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, error, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const { data: paymentConfigs } = usePaymentConfigsGet({ companyUuid: companyId })\n const paymentSpeed = paymentConfigs?.paymentConfigs?.paymentSpeed\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 const fieldErrors = error?.fieldErrors\n useEffect(() => {\n if (fieldErrors && fieldErrors.length > 0) {\n fieldErrors.forEach(fieldError => {\n const key = normalizeErrorKeyForForm(fieldError.field)\n setError(key as keyof PayScheduleInputs, { message: fieldError.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 paymentSpeed,\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","error","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","paymentConfigs","usePaymentConfigsGet","paymentSpeed","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","fieldErrors","useEffect","fieldError","key","normalizeErrorKeyForForm","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":";;;;;;;;;;;;;;;;;;;;;;AAiCO,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,IAAA,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,OAAAC,GAAO,UAAUC,EAAA,IAAiBC,GAAA,GAEhE,EAAE,MAAMC,EAAA,IAAiBC,EAA8B;AAAA,IAC3D,WAAAhB;AAAA,EAAA,CACD,GAEK,EAAE,MAAMiB,EAAA,IAAmBC,EAAqB,EAAE,aAAalB,GAAW,GAC1EmB,IAAeF,GAAgB,gBAAgB,cAE/C,CAACG,GAAMC,CAAO,IAAIC;AAAA,IACtBP,EAAa,iBAAiB,WAAW,IAAI,qBAAqB;AAAA,EAAA,GAE9D,CAACQ,GAAoBC,CAAqB,IAAIF,EAAiC,IAAI,GACnFG,IAA8C;AAAA,IAClD,WAAWxB,GAAe,aAAa;AAAA,IACvC,eAAeA,GAAe,gBAAgB,IAAI,KAAKA,EAAc,aAAa,IAAI;AAAA,IACtF,sBAAsBA,GAAe,uBACjC,IAAI,KAAKA,EA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GC,gBAAA2D,EAACC,IAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAA/D,EAACgE,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 { useCompanyPaymentSpeed } from '@/hooks/useCompanyPaymentSpeed'\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 { normalizeErrorKeyForForm } from '@/helpers/formattedStrings'\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, error, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const { paymentSpeedDays } = useCompanyPaymentSpeed(companyId)\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 const fieldErrors = error?.fieldErrors\n useEffect(() => {\n if (fieldErrors && fieldErrors.length > 0) {\n fieldErrors.forEach(fieldError => {\n const key = normalizeErrorKeyForForm(fieldError.field)\n setError(key as keyof PayScheduleInputs, { message: fieldError.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 isPending: createPayScheduleMutation.isPending || updatePayScheduleMutation.isPending,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n paymentSpeedDays,\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","error","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","paymentSpeedDays","useCompanyPaymentSpeed","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","fieldErrors","useEffect","fieldError","key","normalizeErrorKeyForForm","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":";;;;;;;;;;;;;;;;;;;;;;AAiCO,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,IAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,MAAK,WAAAR,GAAsB,eAAAC,GACzB,UAAAE,EAAM,SAAA,CACT,EAAA,CACF,IAIEK,KAAO,CAAC,EAAE,WAAAR,G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,EAAA;AAAA,MACF;AACA,MAAAf,EAAQ,oBAAoB;AAAA,IAC9B,CAAC;AAAA,EACH;AAEA,SACE,gBAAAd;AAAA,IAAC0D;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAhE;AAAA,QACA,WAAAkD;AAAA,QACA,YAAAE;AAAA,QACA,cAAAD;AAAA,QACA,gBAAAG;AAAA,QACA,MAAAnC;AAAA,QACA,WAAWM,EAA0B,aAAaE,EAA0B;AAAA,QAC5E,cAAcZ,EAAa;AAAA,QAC3B,kBAAkBgC,GAAgB,QAAQ;AAAA,QAC1C,mBAAmBC;AAAA,QACnB,oBAAA1B;AAAA,QACA,kBAAAL;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAX,EAAC,UAAK,eAAY,0BAChB,4BAAC2D,GAAA,EAAc,GAAGpC,GAChB,UAAA,gBAAAvB,EAAC4D,IAAA,EAAK,UAAUrC,EAAY,aAAa2B,CAAQ,GAC9C,UAAA/C,KAGC,gBAAA0D,EAACC,IAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAA9D,EAAC+D,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,19 +1,18 @@
1
- import { jsxs as e, Fragment as d, jsx as o } from "react/jsx-runtime";
2
- import { useTranslation as l } from "react-i18next";
3
- import { usePaySchedule as m } from "../usePaySchedule.js";
4
- import "../../../../shared/constants.js";
5
- import { ActionsLayout as i } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
- import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
1
+ import { jsxs as e, Fragment as l, jsx as o } from "react/jsx-runtime";
2
+ import { useTranslation as m } from "react-i18next";
3
+ import { usePaySchedule as u } from "../usePaySchedule.js";
4
+ import { ActionsLayout as a } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import { useComponentContext as h } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
6
  const E = () => {
8
- const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: a, handleCancel: r, handleContinue: s } = m(), t = u();
9
- return /* @__PURE__ */ e(d, { children: [
10
- c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(i, { children: [
7
+ const { t: n } = m("Company.PaySchedule"), { mode: i, handleAdd: s, handleCancel: c, handleContinue: d, isPending: r } = u(), t = h();
8
+ return /* @__PURE__ */ e(l, { children: [
9
+ i === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(a, { children: [
11
10
  /* @__PURE__ */ o(
12
11
  t.Button,
13
12
  {
14
13
  variant: "secondary",
15
14
  onClick: () => {
16
- a();
15
+ s();
17
16
  },
18
17
  children: n("addAnotherPayScheduleCta")
19
18
  }
@@ -23,37 +22,37 @@ const E = () => {
23
22
  {
24
23
  variant: "primary",
25
24
  onClick: () => {
26
- s();
25
+ d();
27
26
  },
28
27
  children: n("continueCta")
29
28
  }
30
29
  )
31
30
  ] }),
32
- c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
31
+ i === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
33
32
  /* @__PURE__ */ o(
34
33
  t.Button,
35
34
  {
36
35
  variant: "secondary",
37
36
  onClick: () => {
38
- r();
37
+ c();
39
38
  },
40
39
  children: n("actions.cancel")
41
40
  }
42
41
  ),
43
- /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
42
+ /* @__PURE__ */ o(t.Button, { type: "submit", isLoading: r, children: n("actions.save") })
44
43
  ] }),
45
- c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
44
+ i === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
46
45
  /* @__PURE__ */ o(
47
46
  t.Button,
48
47
  {
49
48
  variant: "secondary",
50
49
  onClick: () => {
51
- r();
50
+ c();
52
51
  },
53
52
  children: n("actions.cancel")
54
53
  }
55
54
  ),
56
- /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
55
+ /* @__PURE__ */ o(t.Button, { type: "submit", isLoading: r, children: n("actions.save") })
57
56
  ] })
58
57
  ] });
59
58
  };
@@ -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","js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ACL,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, isPending } = 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\" isLoading={isPending}>\n {t('actions.save')}\n </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\" isLoading={isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","isPending","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GA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AAWF,GACzC,UAAAN,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,24 +1,24 @@
1
1
  import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
- import { useFormContext as C, useWatch as y } from "react-hook-form";
2
+ import { useFormContext as C, useWatch as p } from "react-hook-form";
3
3
  import { useTranslation as g } from "react-i18next";
4
4
  import { useState as S, useEffect as T } from "react";
5
5
  import { usePaySchedule as x } from "../usePaySchedule.js";
6
6
  import n from "./Edit.module.scss.js";
7
- import { Flex as h } from "../../../Common/Flex/Flex.js";
7
+ import { Flex as y } from "../../../Common/Flex/Flex.js";
8
8
  import { Grid as E } from "../../../Common/Grid/Grid.js";
9
9
  import { useComponentContext as N } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
10
  import { useDateFormatter as F } from "../../../../hooks/useDateFormatter.js";
11
11
  import { TextInputField as R } from "../../../Common/Fields/TextInputField/TextInputField.js";
12
12
  import { SelectField as O } from "../../../Common/Fields/SelectField/SelectField.js";
13
13
  import { RadioGroupField as M } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
14
- import { NumberInputField as f } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
15
- import { DatePickerField as P } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
14
+ import { NumberInputField as h } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
15
+ import { DatePickerField as f } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
16
16
  const K = () => {
17
- const l = N(), { t: e } = g("Company.PaySchedule"), D = F(), { payPeriodPreview: r, mode: u, payPreviewLoading: b, paymentSpeed: p } = x(), { setValue: d } = C(), [a, v] = S(0), i = y({ name: "frequency" }), o = y({ name: "customTwicePerMonth" }), w = i === "Twice per month" && o === "custom" || i === "Monthly", q = i === "Twice per month" && o === "custom";
17
+ const l = N(), { t: e } = g("Company.PaySchedule"), P = F(), { payPeriodPreview: r, mode: u, payPreviewLoading: D, paymentSpeedDays: v } = x(), { setValue: d } = C(), [a, b] = S(0), i = p({ name: "frequency" }), o = p({ name: "customTwicePerMonth" }), w = i === "Twice per month" && o === "custom" || i === "Monthly", q = i === "Twice per month" && o === "custom";
18
18
  return T(() => {
19
19
  i === "Twice per month" && o === "1st15th" && (d("day1", 15), d("day2", 31));
20
20
  }, [i, o, d]), u !== "EDIT_PAY_SCHEDULE" && u !== "ADD_PAY_SCHEDULE" ? null : /* @__PURE__ */ t("div", { className: n.payScheduleContainer, children: /* @__PURE__ */ m(E, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
21
- /* @__PURE__ */ t("div", { className: n.payScheduleForm, children: /* @__PURE__ */ m(h, { flexDirection: "column", children: [
21
+ /* @__PURE__ */ t("div", { className: n.payScheduleForm, children: /* @__PURE__ */ m(y, { flexDirection: "column", children: [
22
22
  /* @__PURE__ */ t(R, { name: "customName", label: e("labels.name"), isRequired: !0 }),
23
23
  /* @__PURE__ */ t(
24
24
  O,
@@ -47,19 +47,19 @@ const K = () => {
47
47
  }
48
48
  ),
49
49
  /* @__PURE__ */ t(
50
- P,
50
+ f,
51
51
  {
52
52
  name: "anchorPayDate",
53
53
  label: e("labels.firstPayDate"),
54
54
  description: e("descriptions.anchorPayDateDescription", {
55
- count: p ? Number(p.split("-")[0]) : 2
55
+ count: v
56
56
  }),
57
57
  isRequired: !0,
58
58
  minDate: /* @__PURE__ */ new Date()
59
59
  }
60
60
  ),
61
61
  /* @__PURE__ */ t(
62
- P,
62
+ f,
63
63
  {
64
64
  name: "anchorEndOfPayPeriod",
65
65
  label: e("labels.firstPayPeriodEndDate"),
@@ -67,23 +67,23 @@ const K = () => {
67
67
  isRequired: !0
68
68
  }
69
69
  ),
70
- /* @__PURE__ */ t("div", { className: w ? "" : n.visuallyHidden, children: /* @__PURE__ */ t(f, { name: "day1", label: e("labels.firstPayDayOfTheMonth"), isRequired: !0 }) }),
71
- /* @__PURE__ */ t("div", { className: q ? "" : n.visuallyHidden, children: /* @__PURE__ */ t(f, { name: "day2", label: e("labels.lastPayDayOfTheMonth"), isRequired: !0 }) })
70
+ /* @__PURE__ */ t("div", { className: w ? "" : n.visuallyHidden, children: /* @__PURE__ */ t(h, { name: "day1", label: e("labels.firstPayDayOfTheMonth"), isRequired: !0 }) }),
71
+ /* @__PURE__ */ t("div", { className: q ? "" : n.visuallyHidden, children: /* @__PURE__ */ t(h, { name: "day2", label: e("labels.lastPayDayOfTheMonth"), isRequired: !0 }) })
72
72
  ] }) }),
73
- /* @__PURE__ */ t(h, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: r && r[a] ? /* @__PURE__ */ m("div", { className: n.calendarContainer, children: [
74
- !b && /* @__PURE__ */ t(
73
+ /* @__PURE__ */ t(y, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: r && r[a] ? /* @__PURE__ */ m("div", { className: n.calendarContainer, children: [
74
+ !D && /* @__PURE__ */ t(
75
75
  l.Select,
76
76
  {
77
77
  label: e("labels.preview"),
78
78
  isRequired: !0,
79
79
  options: r.map((s, c) => ({
80
80
  value: String(c),
81
- label: D.formatPayPeriodRange(s.startDate, s.endDate)
81
+ label: P.formatPayPeriodRange(s.startDate, s.endDate)
82
82
  })),
83
83
  value: String(a),
84
84
  onChange: (s) => {
85
85
  const c = Number(s);
86
- isNaN(c) || v(c);
86
+ isNaN(c) || b(c);
87
87
  }
88
88
  }
89
89
  ),
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Edit.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { useEffect, useState } from 'react'\nimport type { PayScheduleInputs } from '../usePaySchedule'\nimport { usePaySchedule } from '../usePaySchedule'\nimport style from './Edit.module.scss'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n Grid,\n TextInputField,\n NumberInputField,\n DatePickerField,\n} from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport const Edit = () => {\n const Components = useComponentContext()\n const { t } = useTranslation('Company.PaySchedule')\n const dateFormatter = useDateFormatter()\n const { payPeriodPreview, mode, payPreviewLoading, paymentSpeed } = usePaySchedule()\n const { setValue } = useFormContext<PayScheduleInputs>()\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n const frequency = useWatch({ name: 'frequency' })\n const customTwicePerMonth = useWatch({ name: 'customTwicePerMonth' })\n\n const shouldShowDay1 =\n (frequency === 'Twice per month' && customTwicePerMonth === 'custom') || frequency === 'Monthly'\n const shouldShowDay2 = frequency === 'Twice per month' && customTwicePerMonth === 'custom'\n\n useEffect(() => {\n if (frequency === 'Twice per month' && customTwicePerMonth === '1st15th') {\n setValue('day1', 15)\n setValue('day2', 31)\n }\n }, [frequency, customTwicePerMonth, setValue])\n\n if (mode !== 'EDIT_PAY_SCHEDULE' && mode !== 'ADD_PAY_SCHEDULE') {\n return null\n }\n\n return (\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection={'column'}>\n <TextInputField name=\"customName\" label={t('labels.name')} isRequired />\n <SelectField\n name=\"frequency\"\n label={t('labels.frequency')}\n options={[\n { value: 'Every week', label: t('frequencies.everyWeek') },\n { value: 'Every other week', label: t('frequencies.everyOtherWeek') },\n { value: 'Twice per month', label: t('frequencies.twicePerMonth') },\n { value: 'Monthly', label: t('frequencies.monthly') },\n ]}\n isRequired\n />\n {frequency === 'Twice per month' && (\n <RadioGroupField\n name=\"customTwicePerMonth\"\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n options={[\n { value: '1st15th', label: t('frequencyOptions.15thAndLast') },\n { value: 'custom', label: t('frequencyOptions.custom') },\n ]}\n />\n )}\n <DatePickerField\n name=\"anchorPayDate\"\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeed ? Number(paymentSpeed.split('-')[0]) : 2,\n })}\n isRequired\n minDate={new Date()}\n />\n <DatePickerField\n name=\"anchorEndOfPayPeriod\"\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n isRequired\n />\n <div className={shouldShowDay1 ? '' : style.visuallyHidden}>\n <NumberInputField name=\"day1\" label={t('labels.firstPayDayOfTheMonth')} isRequired />\n </div>\n <div className={shouldShowDay2 ? '' : style.visuallyHidden}>\n <NumberInputField name=\"day2\" label={t('labels.lastPayDayOfTheMonth')} isRequired />\n </div>\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => {\n return {\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(period.startDate, period.endDate),\n }\n })}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(payPeriodPreview[selectedPayPeriodIndex].startDate as string),\n end: new Date(payPeriodPreview[selectedPayPeriodIndex].endDate as string),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(payPeriodPreview[selectedPayPeriodIndex].checkDate as string),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(payPeriodPreview[selectedPayPeriodIndex].runPayrollBy as string),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n )\n}\n"],"names":["Edit","Components","useComponentContext","t","useTranslation","dateFormatter","useDateFormatter","payPeriodPreview","mode","payPreviewLoading","paymentSpeed","usePaySchedule","setValue","useFormContext","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","frequency","useWatch","customTwicePerMonth","shouldShowDay1","shouldShowDay2","useEffect","jsx","style","jsxs","Grid","Flex","TextInputField","SelectField","RadioGroupField","DatePickerField","NumberInputField","period","index","value","numericValue"],"mappings":";;;;;;;;;;;;;;;AAkBO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAgBC,EAAA,GAChB,EAAE,kBAAAC,GAAkB,MAAAC,GAAM,mBAAAC,GAAmB,cAAAC,EAAA,IAAiBC,EAAA,GAC9D,EAAE,UAAAC,EAAA,IAAaC,EAAA,GACf,CAACC,GAAwBC,CAAyB,IAAIC,EAAS,CAAC,GAEhEC,IAAYC,EAAS,EAAE,MAAM,aAAa,GAC1CC,IAAsBD,EAAS,EAAE,MAAM,uBAAuB,GAE9DE,IACHH,MAAc,qBAAqBE,MAAwB,YAAaF,MAAc,WACnFI,IAAiBJ,MAAc,qBAAqBE,MAAwB;AASlF,SAPAG,EAAU,MAAM;AACd,IAAIL,MAAc,qBAAqBE,MAAwB,cAC7DP,EAAS,QAAQ,EAAE,GACnBA,EAAS,QAAQ,EAAE;AAAA,EAEvB,GAAG,CAACK,GAAWE,GAAqBP,CAAQ,CAAC,GAEzCJ,MAAS,uBAAuBA,MAAS,qBACpC,OAIP,gBAAAe,EAAC,OAAA,EAAI,WAAWC,EAAM,sBACpB,UAAA,gBAAA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AA,QAAX;AAAA,UAEC,WAAW;AAAA,YACT,OAAO,IAAI,KAAKM,EAAiBO,CAAsB,EAAE,SAAmB;AAAA,YAC5E,KAAK,IAAI,KAAKP,EAAiBO,CAAsB,EAAE,OAAiB;AAAA,YACxE,OAAOX,EAAE,sBAAsB,KAAK;AAAA,UAAA;AAAA,UAEtC,gBAAgB;AAAA,YACd;AAAA,cACE,MAAM,IAAI,KAAKI,EAAiBO,CAAsB,EAAE,SAAmB;AAAA,cAC3E,gBAAgB;AAAA,cAChB,OAAOX,EAAE,mBAAmB,KAAK;AAAA,YAAA;AAAA,YAEnC;AAAA,cACE,MAAM,IAAI,KAAKI,EAAiBO,CAAsB,EAAE,YAAsB;AAAA,cAC9E,gBAAgB;AAAA,cAChB,OAAOX,EAAE,4BAA4B,KAAK;AAAA,YAAA;AAAA,UAC5C;AAAA,QACF;AAAA,QAjBKW;AAAA,MAAA;AAAA,IAkBP,GACF,IAEA,gBAAAS,EAAC,OAAA,EAAI,WAAWC,EAAM,mBACpB,UAAA,gBAAAD;AAAA,MAACtB,EAAW;AAAA,MAAX;AAAA,QACC,QAAO;AAAA,QACP,OAAOE,EAAE,sBAAsB,sBAAsB;AAAA,QAErD,UAAA,gBAAAoB,EAACtB,EAAW,MAAX,EACE,UAAAE;AAAA,UACC;AAAA,UACA;AAAA,QAAA,EACF,CACF;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CAEJ;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"Edit.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Edit.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { useEffect, useState } from 'react'\nimport type { PayScheduleInputs } from '../usePaySchedule'\nimport { usePaySchedule } from '../usePaySchedule'\nimport style from './Edit.module.scss'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n Grid,\n TextInputField,\n NumberInputField,\n DatePickerField,\n} from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport const Edit = () => {\n const Components = useComponentContext()\n const { t } = useTranslation('Company.PaySchedule')\n const dateFormatter = useDateFormatter()\n const { payPeriodPreview, mode, payPreviewLoading, paymentSpeedDays } = usePaySchedule()\n const { setValue } = useFormContext<PayScheduleInputs>()\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n const frequency = useWatch({ name: 'frequency' })\n const customTwicePerMonth = useWatch({ name: 'customTwicePerMonth' })\n\n const shouldShowDay1 =\n (frequency === 'Twice per month' && customTwicePerMonth === 'custom') || frequency === 'Monthly'\n const shouldShowDay2 = frequency === 'Twice per month' && customTwicePerMonth === 'custom'\n\n useEffect(() => {\n if (frequency === 'Twice per month' && customTwicePerMonth === '1st15th') {\n setValue('day1', 15)\n setValue('day2', 31)\n }\n }, [frequency, customTwicePerMonth, setValue])\n\n if (mode !== 'EDIT_PAY_SCHEDULE' && mode !== 'ADD_PAY_SCHEDULE') {\n return null\n }\n\n return (\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection={'column'}>\n <TextInputField name=\"customName\" label={t('labels.name')} isRequired />\n <SelectField\n name=\"frequency\"\n label={t('labels.frequency')}\n options={[\n { value: 'Every week', label: t('frequencies.everyWeek') },\n { value: 'Every other week', label: t('frequencies.everyOtherWeek') },\n { value: 'Twice per month', label: t('frequencies.twicePerMonth') },\n { value: 'Monthly', label: t('frequencies.monthly') },\n ]}\n isRequired\n />\n {frequency === 'Twice per month' && (\n <RadioGroupField\n name=\"customTwicePerMonth\"\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n options={[\n { value: '1st15th', label: t('frequencyOptions.15thAndLast') },\n { value: 'custom', label: t('frequencyOptions.custom') },\n ]}\n />\n )}\n <DatePickerField\n name=\"anchorPayDate\"\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeedDays,\n })}\n isRequired\n minDate={new Date()}\n />\n <DatePickerField\n name=\"anchorEndOfPayPeriod\"\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n isRequired\n />\n <div className={shouldShowDay1 ? '' : style.visuallyHidden}>\n <NumberInputField name=\"day1\" label={t('labels.firstPayDayOfTheMonth')} isRequired />\n </div>\n <div className={shouldShowDay2 ? '' : style.visuallyHidden}>\n <NumberInputField name=\"day2\" label={t('labels.lastPayDayOfTheMonth')} isRequired />\n </div>\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => {\n return {\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(period.startDate, period.endDate),\n }\n })}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(payPeriodPreview[selectedPayPeriodIndex].startDate as string),\n end: new Date(payPeriodPreview[selectedPayPeriodIndex].endDate as string),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(payPeriodPreview[selectedPayPeriodIndex].checkDate as string),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(payPeriodPreview[selectedPayPeriodIndex].runPayrollBy as string),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n )\n}\n"],"names":["Edit","Components","useComponentContext","t","useTranslation","dateFormatter","useDateFormatter","payPeriodPreview","mode","payPreviewLoading","paymentSpeedDays","usePaySchedule","setValue","useFormContext","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","frequency","useWatch","customTwicePerMonth","shouldShowDay1","shouldShowDay2","useEffect","jsx","style","jsxs","Grid","Flex","TextInputField","SelectField","RadioGroupField","DatePickerField","NumberInputField","period","index","value","numericValue"],"mappings":";;;;;;;;;;;;;;;AAkBO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAgBC,EAAA,GAChB,EAAE,kBAAAC,GAAkB,MAAAC,GAAM,mBAAAC,GAAmB,kBAAAC,EAAA,IAAqBC,EAAA,GAClE,EAAE,UAAAC,EAAA,IAAaC,EAAA,GACf,CAACC,GAAwBC,CAAyB,IAAIC,EAAS,CAAC,GAEhEC,IAAYC,EAAS,EAAE,MAAM,aAAa,GAC1CC,IAAsBD,EAAS,EAAE,MAAM,uBAAuB,GAE9DE,IACHH,MAAc,qBAAqBE,MAAwB,YAAaF,MAAc,WACnFI,IAAiBJ,MAAc,qBAAqBE,MAAwB;AASlF,SAPAG,EAAU,MAAM;AACd,IAAIL,MAAc,qBAAqBE,MAAwB,cAC7DP,EAAS,QAAQ,EAAE,GACnBA,EAAS,QAAQ,EAAE;AAAA,EAEvB,GAAG,CAACK,GAAWE,GAAqBP,CAAQ,CAAC,GAEzCJ,MAAS,uBAAuBA,MAAS,qBACpC,OAIP,gBAAAe,EAAC,OAAA,EAAI,WAAWC,EAAM,sBACpB,UAAA,gB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