@gusto/embedded-react-sdk 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (485) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +32 -17
  3. package/dist/UNSTABLE_Hooks.d.ts +1 -0
  4. package/dist/UNSTABLE_Hooks.js +9 -0
  5. package/dist/UNSTABLE_Hooks.js.map +1 -0
  6. package/dist/assets/icons/coins-hand.svg.js +10 -0
  7. package/dist/assets/icons/coins-hand.svg.js.map +1 -0
  8. package/dist/assets/icons/icon-file-outline.svg.js +10 -0
  9. package/dist/assets/icons/icon-file-outline.svg.js.map +1 -0
  10. package/dist/assets/icons/icon-receipt-outline.svg.js +10 -0
  11. package/dist/assets/icons/icon-receipt-outline.svg.js.map +1 -0
  12. package/dist/components/Base/Base.d.ts +19 -4
  13. package/dist/components/Base/Base.js +67 -61
  14. package/dist/components/Base/Base.js.map +1 -1
  15. package/dist/components/Base/index.d.ts +1 -1
  16. package/dist/components/Base/useBase.d.ts +1 -1
  17. package/dist/components/Base/useBase.js.map +1 -1
  18. package/dist/components/Base/useBaseSubmit.d.ts +10 -0
  19. package/dist/components/Base/useBaseSubmit.js +33 -0
  20. package/dist/components/Base/useBaseSubmit.js.map +1 -0
  21. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
  22. package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
  23. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
  24. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
  25. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
  26. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  27. package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
  28. package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
  29. package/dist/components/Common/Fields/TextAreaField/TextAreaField.d.ts +5 -0
  30. package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +34 -0
  31. package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -0
  32. package/dist/components/Common/Fields/TextAreaField/index.d.ts +3 -0
  33. package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
  34. package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
  35. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +10 -10
  36. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  37. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -0
  38. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +14 -0
  39. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -0
  40. package/dist/components/Common/FlowBreadcrumbs/index.d.ts +1 -0
  41. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -2
  42. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  43. package/dist/components/Common/SignatureForm/SignatureFormActions.js +8 -6
  44. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  45. package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -11
  46. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  47. package/dist/components/Common/UI/Alert/Alert.js +23 -22
  48. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  49. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +4 -0
  50. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
  51. package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
  52. package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -1
  53. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  54. package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
  55. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -1
  56. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
  57. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
  58. package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
  59. package/dist/components/Common/UI/DatePicker/DatePicker.js +38 -37
  60. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  61. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +7 -7
  62. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +4 -0
  63. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  64. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -1
  65. package/dist/components/Common/UI/Modal/Modal.module.scss.js +17 -17
  66. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  67. package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -1
  68. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  69. package/dist/components/Common/UI/Select/Select.d.ts +1 -1
  70. package/dist/components/Common/UI/Select/Select.js +27 -26
  71. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  72. package/dist/components/Common/UI/Select/Select.module.scss.js +6 -6
  73. package/dist/components/Common/UI/Select/SelectTypes.d.ts +4 -0
  74. package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
  75. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  76. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  77. package/dist/components/Common/UI/TextArea/TextArea.d.ts +2 -0
  78. package/dist/components/Common/UI/TextArea/TextArea.js +79 -0
  79. package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -0
  80. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +12 -0
  81. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js.map +1 -0
  82. package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +37 -0
  83. package/dist/components/Common/UI/TextArea/TextAreaTypes.js +9 -0
  84. package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -0
  85. package/dist/components/Common/UI/TextArea/index.d.ts +4 -0
  86. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  87. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -5
  88. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  89. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +5 -2
  90. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  91. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +4 -2
  92. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  93. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +8 -6
  94. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  95. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
  96. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  97. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  98. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  99. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +4 -2
  100. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  101. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +11 -9
  102. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  103. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -8
  104. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  105. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  106. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  107. package/dist/components/Company/AssignSignatory/TitleSelect.js +6 -4
  108. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  109. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  110. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  111. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +10 -9
  112. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  113. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +10 -8
  114. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  115. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  116. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  117. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -8
  118. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  119. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +10 -8
  120. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  121. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
  122. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  123. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +4 -2
  124. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  125. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -8
  126. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  127. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  128. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  129. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -7
  130. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  131. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  132. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  133. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  134. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  135. package/dist/components/Company/FederalTaxes/FederalTaxes.js +4 -2
  136. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  137. package/dist/components/Company/FederalTaxes/Form.js +4 -4
  138. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
  139. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  140. package/dist/components/Company/Industry/Actions.js +9 -7
  141. package/dist/components/Company/Industry/Actions.js.map +1 -1
  142. package/dist/components/Company/Industry/Context.js +6 -7
  143. package/dist/components/Company/Industry/Context.js.map +1 -1
  144. package/dist/components/Company/Industry/Edit.js +7 -4
  145. package/dist/components/Company/Industry/Edit.js.map +1 -1
  146. package/dist/components/Company/Locations/LocationForm/Actions.js +10 -8
  147. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  148. package/dist/components/Company/Locations/LocationForm/Form.js +6 -4
  149. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  150. package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -8
  151. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  152. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  153. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  154. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  155. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  156. package/dist/components/Company/Locations/LocationsList/List.js +16 -15
  157. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  158. package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -2
  159. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  160. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  161. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  162. package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
  163. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  164. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +10 -9
  165. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  166. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +8 -6
  167. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  168. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  169. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  170. package/dist/components/Company/PaySchedule/PaySchedule.js +3 -2
  171. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  172. package/dist/components/Company/PaySchedule/_parts/Actions.js +11 -9
  173. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  174. package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
  175. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  176. package/dist/components/Company/PaySchedule/_parts/List.js +8 -8
  177. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  178. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  179. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +4 -2
  180. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  181. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  182. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  183. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +4 -2
  184. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  185. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +4 -2
  186. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  187. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  188. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  189. package/dist/components/Contractor/Address/Address.js +5 -3
  190. package/dist/components/Contractor/Address/Address.js.map +1 -1
  191. package/dist/components/Contractor/Address/Form.js +11 -9
  192. package/dist/components/Contractor/Address/Form.js.map +1 -1
  193. package/dist/components/Contractor/Address/useAddress.js +5 -6
  194. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  195. package/dist/components/Contractor/ContractorList/index.js +4 -4
  196. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
  197. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  198. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +5 -3
  199. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  200. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +7 -0
  201. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +48 -0
  202. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -0
  203. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +14 -0
  204. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +109 -0
  205. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -0
  206. package/dist/components/Contractor/Payments/Detail/DetailPresentation.d.ts +19 -0
  207. package/dist/components/Contractor/Payments/EditPayment/EditPayment.d.ts +7 -0
  208. package/dist/components/Contractor/Payments/EditPayment/EditPayment.js +34 -0
  209. package/dist/components/Contractor/Payments/EditPayment/EditPayment.js.map +1 -0
  210. package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.d.ts +6 -0
  211. package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js +84 -0
  212. package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js.map +1 -0
  213. package/dist/components/Contractor/Payments/Overview/Overview.d.ts +7 -0
  214. package/dist/components/Contractor/Payments/Overview/Overview.js +72 -0
  215. package/dist/components/Contractor/Payments/Overview/Overview.js.map +1 -0
  216. package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +18 -0
  217. package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js +131 -0
  218. package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js.map +1 -0
  219. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +2 -0
  220. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js +26 -0
  221. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -0
  222. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +15 -0
  223. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +30 -0
  224. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -0
  225. package/dist/components/Contractor/Payments/PaymentFlow/index.d.ts +3 -0
  226. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +8 -0
  227. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +158 -0
  228. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -0
  229. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +7 -0
  230. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +29 -0
  231. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -0
  232. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +18 -0
  233. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +108 -0
  234. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -0
  235. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +10 -0
  236. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js.map +1 -0
  237. package/dist/components/Contractor/Payments/types.d.ts +4 -0
  238. package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
  239. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +26 -26
  240. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
  241. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  242. package/dist/components/Contractor/Submit/Submit.js +20 -19
  243. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  244. package/dist/components/Contractor/index.d.ts +1 -0
  245. package/dist/components/Contractor/index.js +4 -2
  246. package/dist/components/Contractor/index.js.map +1 -1
  247. package/dist/components/Employee/Compensation/Actions.js +14 -13
  248. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  249. package/dist/components/Employee/Compensation/List.js +23 -22
  250. package/dist/components/Employee/Compensation/List.js.map +1 -1
  251. package/dist/components/Employee/Deductions/Deductions.d.ts +1 -1
  252. package/dist/components/Employee/Deductions/Deductions.js +10 -10
  253. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  254. package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +2 -0
  255. package/dist/components/Employee/Deductions/DeductionsComponents.js +6 -6
  256. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  257. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +220 -0
  258. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
  259. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
  260. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
  261. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -2
  262. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +163 -0
  263. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
  264. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +0 -34
  265. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +121 -125
  266. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  267. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
  268. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
  269. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +56 -0
  270. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +158 -0
  271. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -0
  272. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +55 -55
  273. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  274. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +6 -0
  275. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +54 -0
  276. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -0
  277. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +14 -0
  278. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -0
  279. package/dist/components/Employee/Deductions/stateMachine.js +49 -29
  280. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  281. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  282. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  283. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +4 -2
  284. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  285. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  286. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  287. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  288. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  289. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +4 -2
  290. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  291. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  292. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  293. package/dist/components/Employee/EmployeeList/Actions.js +8 -6
  294. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  295. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -2
  296. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  297. package/dist/components/Employee/EmployeeList/Head.js +6 -5
  298. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  299. package/dist/components/Employee/EmployeeList/List.js +14 -14
  300. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  301. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  302. package/dist/components/Employee/FederalTaxes/Actions.js +9 -7
  303. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  304. package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +22 -7
  305. package/dist/components/Employee/FederalTaxes/FederalForm.js +85 -29
  306. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  307. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +62 -46
  308. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  309. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  310. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  311. package/dist/components/Employee/Landing/Landing.js +3 -2
  312. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  313. package/dist/components/Employee/PaymentMethod/Actions.js +8 -6
  314. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  315. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -3
  316. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  317. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -11
  318. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  319. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -6
  320. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  321. package/dist/components/Employee/PaymentMethod/Split.js +5 -5
  322. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  323. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  324. package/dist/components/Employee/Profile/Actions.js +9 -7
  325. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  326. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
  327. package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -8
  328. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  329. package/dist/components/Employee/Profile/HomeAddress.js +9 -8
  330. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  331. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
  332. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +26 -23
  333. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  334. package/dist/components/Employee/Profile/useProfile.js +3 -4
  335. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  336. package/dist/components/Employee/StateTaxes/Actions.js +10 -8
  337. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  338. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  339. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  340. package/dist/components/Employee/Taxes/Actions.js +10 -8
  341. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  342. package/dist/components/Employee/Taxes/FederalForm.d.ts +22 -7
  343. package/dist/components/Employee/Taxes/FederalForm.js +85 -29
  344. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  345. package/dist/components/Employee/Taxes/Taxes.js +97 -81
  346. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  347. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  348. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  349. package/dist/components/Flow/Flow.js +14 -13
  350. package/dist/components/Flow/Flow.js.map +1 -1
  351. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +1 -1
  352. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +63 -34
  353. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  354. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.module.scss.js +8 -0
  355. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.module.scss.js.map +1 -0
  356. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +2 -0
  357. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +71 -54
  358. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  359. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +23 -0
  360. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +27 -15
  361. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
  362. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +25 -2
  363. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +152 -23
  364. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  365. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js +10 -0
  366. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js.map +1 -0
  367. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +9 -1
  368. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +194 -22
  369. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  370. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +18 -0
  371. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js.map +1 -0
  372. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +10 -2
  373. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +44 -30
  374. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
  375. package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -0
  376. package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +5 -0
  377. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +3 -2
  378. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  379. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +7 -6
  380. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  381. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +15 -15
  382. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  383. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  384. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  385. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +32 -40
  386. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  387. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -12
  388. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +44 -52
  389. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  390. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +9 -6
  391. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +104 -101
  392. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  393. package/dist/components/Payroll/PayrollList/PayrollList.js +58 -59
  394. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  395. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +4 -6
  396. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +77 -69
  397. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  398. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +127 -103
  399. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  400. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +254 -185
  401. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  402. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +3 -2
  403. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -1
  404. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +1 -1
  405. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +7 -0
  406. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js +19 -0
  407. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -0
  408. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js +10 -0
  409. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js.map +1 -0
  410. package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +4 -0
  411. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +33 -0
  412. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +161 -0
  413. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -0
  414. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +3 -0
  415. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js +17 -0
  416. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -0
  417. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.test.d.ts +1 -0
  418. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
  419. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +70 -0
  420. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
  421. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +7 -0
  422. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +6 -0
  423. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -0
  424. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +9 -0
  425. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +40 -0
  426. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +1 -0
  427. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +5 -0
  428. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +2 -0
  429. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +12 -0
  430. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +1 -0
  431. package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +2 -0
  432. package/dist/components/Payroll/helpers.d.ts +0 -5
  433. package/dist/components/Payroll/helpers.js +106 -112
  434. package/dist/components/Payroll/helpers.js.map +1 -1
  435. package/dist/components/Payroll/usePreparedPayrollData.js +5 -6
  436. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  437. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
  438. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  439. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  440. package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
  441. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  442. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +7 -5
  443. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  444. package/dist/helpers/dateFormatting.d.ts +9 -0
  445. package/dist/helpers/dateFormatting.js +65 -52
  446. package/dist/helpers/dateFormatting.js.map +1 -1
  447. package/dist/i18n/I18n.js +3 -3
  448. package/dist/i18n/I18n.js.map +1 -1
  449. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +34 -0
  450. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -0
  451. package/dist/i18n/en/Contractor.Payments.EditPayment.json.js +36 -0
  452. package/dist/i18n/en/Contractor.Payments.EditPayment.json.js.map +1 -0
  453. package/dist/i18n/en/Contractor.Payments.Overview.json.js +34 -0
  454. package/dist/i18n/en/Contractor.Payments.Overview.json.js.map +1 -0
  455. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +34 -0
  456. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -0
  457. package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +24 -0
  458. package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +1 -0
  459. package/dist/i18n/en/Employee.Deductions.json.js +58 -46
  460. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  461. package/dist/i18n/en/Employee.FederalTaxes.json.js +49 -41
  462. package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -1
  463. package/dist/i18n/en/Employee.Taxes.json.js +53 -45
  464. package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
  465. package/dist/i18n/en/Payroll.Common.json.js +8 -0
  466. package/dist/i18n/en/Payroll.Common.json.js.map +1 -0
  467. package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +25 -5
  468. package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -1
  469. package/dist/i18n/en/Payroll.PayrollList.json.js +14 -16
  470. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  471. package/dist/i18n/en/Payroll.PayrollOverview.json.js +34 -30
  472. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  473. package/dist/i18n/en/Payroll.WireInstructions.json.js +22 -6
  474. package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
  475. package/dist/shared/constants.d.ts +18 -0
  476. package/dist/shared/constants.js +66 -55
  477. package/dist/shared/constants.js.map +1 -1
  478. package/dist/style.css +1 -1
  479. package/dist/types/i18next.d.ts +236 -15
  480. package/package.json +19 -15
  481. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +0 -7
  482. package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +0 -6
  483. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +0 -15
  484. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +0 -49
  485. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Frequency } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayschedules'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, fieldErrors, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.payScheduleList?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors) {\n // TODO: These error messages are not being localized correctly\n fieldErrors.forEach(error => {\n setError(error.errorKey as keyof PayScheduleInputs, { message: error.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n anchorPayDate: formattedAnchorPayDate,\n anchorEndOfPayPeriod: formattedAnchorEndOfPayPeriod,\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n },\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as Frequency,\n anchorPayDate: schedule.anchorPayDate ? new Date(schedule.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod)\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","fieldErrors","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","useEffect","error","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","js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AkBD,EAAQ,aAAa;AAAA,cACtD,sBAAsBC,EAAkBD,EAAQ,oBAAoB;AAAA,cACpE,YAAYA,EAAQ;AAAA,cACpB,MAAMA,EAAQ;AAAA,cACd,MAAMA,EAAQ;AAAA,cACd,SAAAI;AAAA,YAAA;AAAA,UACF;AAAA,QACF,CACD;AACD,QAAA9C,EAAQuC,EAAgB,sBAAsBQ,CAAyB,GACvEzB,EAAA;AAAA,MACF;AACA,MAAAf,EAAQ,oBAAoB;AAAA,IAC9B,CAAC;AAAA,EACH;AAEA,SACE,gBAAAZ;AAAA,IAACqD;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAA3D;AAAA,QACA,WAAA6C;AAAA,QACA,YAAAE;AAAA,QACA,cAAAD;AAAA,QACA,gBAAAG;AAAA,QACA,MAAAhC;AAAA,QACA,cAAcF,EAAa;AAAA,QAC3B,kBAAkB2B,GAAgB,QAAQ;AAAA,QAC1C,mBAAmBC;AAAA,QACnB,oBAAAvB;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAd,EAAC,UAAK,eAAY,0BAChB,4BAACsD,GAAA,EAAc,GAAGjC,GAChB,UAAA,gBAAArB,EAACuD,GAAA,EAAK,UAAUlC,EAAY,aAAawB,CAAQ,GAC9C,UAAA1C,KAGC,gBAAAqD,EAACC,IAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Frequency } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayschedules'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, fieldErrors, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.payScheduleList?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors) {\n // TODO: These error messages are not being localized correctly\n fieldErrors.forEach(error => {\n setError(error.errorKey as keyof PayScheduleInputs, { message: error.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n anchorPayDate: formattedAnchorPayDate,\n anchorEndOfPayPeriod: formattedAnchorEndOfPayPeriod,\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n },\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as Frequency,\n anchorPayDate: schedule.anchorPayDate ? new Date(schedule.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod)\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","fieldErrors","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","useEffect","error","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,GAAQ,qBAAqB,GAC7BC,GAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,MAAK,WAAAR,GAAsB,eAAAC,GACzB,UAAAE,EAAM,SAAA,CACT,EAAA,CACF,IAIEK,KAAO,CAAC,EAAE,WAAAR,GAAW,UAAAS,GAAU,eAAAR,QAAsC;AACzE,QAAM,EAAE,mBAAAS,GAAmB,SAAAC,GAAS,aAAAC,GAAa,UAAUC,EAAA,IAAiBC,EAAA,GAEtE,EAAE,MAAMC,EAAA,IAAiBC,EAA8B;AAAA,IAC3D,WAAAhB;AAAA,EAAA,CACD,GAEK,CAACiB,GAAMC,CAAO,IAAIC;AAAA,IACtBJ,EAAa,iBAAiB,WAAW,IAAI,qBAAqB;AAAA,EAAA,GAE9D,CAACK,GAAoBC,CAAqB,IAAIF,EAAiC,IAAI,GACnFG,IAA8C;AAAA,IAClD,WAAWrB,GAAe,aAAa;AAAA,IACvC,eAAeA,GAAe,gBAAgB,IAAI,KAAKA,EAAc,aAAa,IAAI;AAAA,IACtF,sBAAsBA,GAAe,uBACjC,IAAI,KAAKA,EAAc,oBAAoB,IAC3C;AAAA,IACJ,MAAMA,GAAe,QAAQ;AAAA,IAC7B,MAAMA,GAAe,QAAQ;AAAA,IAC7B,YAAYA,GAAe,cAAc;AAAA,IACzC,qBAAqB;AAAA,EAAA,GAGjBsB,IAA4BC,EAAA,GAC5BC,IAA4BC,EAAA,GAE5BC,IAAcC,EAA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
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import { usePaySchedule as m } from "../usePaySchedule.js";
4
+ import "../../../../shared/constants.js";
4
5
  import "classnames";
5
- import { ActionsLayout as i } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
+ import { ActionsLayout as r } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const E = () => {
8
- const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: a, handleCancel: r, handleContinue: s } = m(), t = u();
8
+ import "react";
9
+ const B = () => {
10
+ const { t: n } = l("Company.PaySchedule"), { mode: i, handleAdd: a, handleCancel: c, handleContinue: s } = m(), t = u();
9
11
  return /* @__PURE__ */ e(d, { children: [
10
- c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(i, { children: [
12
+ i === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(r, { children: [
11
13
  /* @__PURE__ */ o(
12
14
  t.Button,
13
15
  {
@@ -29,26 +31,26 @@ const E = () => {
29
31
  }
30
32
  )
31
33
  ] }),
32
- c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
34
+ i === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
33
35
  /* @__PURE__ */ o(
34
36
  t.Button,
35
37
  {
36
38
  variant: "secondary",
37
39
  onClick: () => {
38
- r();
40
+ c();
39
41
  },
40
42
  children: n("actions.cancel")
41
43
  }
42
44
  ),
43
45
  /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
44
46
  ] }),
45
- c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
47
+ i === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
46
48
  /* @__PURE__ */ o(
47
49
  t.Button,
48
50
  {
49
51
  variant: "secondary",
50
52
  onClick: () => {
51
- r();
53
+ c();
52
54
  },
53
55
  children: n("actions.cancel")
54
56
  }
@@ -58,6 +60,6 @@ const E = () => {
58
60
  ] });
59
61
  };
60
62
  export {
61
- E as Actions
63
+ B as Actions
62
64
  };
63
65
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5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,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAA,GACpDC,IAAaC,EAAA;AAEnB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as o } from "react-i18next";
1
+ import { jsx as e, jsxs as s, Fragment as o } from "react/jsx-runtime";
2
+ import { useTranslation as c, Trans as a } from "react-i18next";
3
3
  import { usePaySchedule as d } from "../usePaySchedule.js";
4
4
  import { Flex as h } from "../../../Common/Flex/Flex.js";
5
5
  import "classnames";
6
6
  import { useComponentContext as l } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const D = () => {
7
+ import "react";
8
+ const L = () => {
8
9
  const { t: i } = c("Company.PaySchedule"), n = l(), { mode: r } = d();
9
- let t = /* @__PURE__ */ e(a, {});
10
+ let t = /* @__PURE__ */ e(o, {});
10
11
  switch (r) {
11
12
  case "LIST_PAY_SCHEDULES":
12
- t = /* @__PURE__ */ s(a, { children: [
13
+ t = /* @__PURE__ */ s(o, { children: [
13
14
  /* @__PURE__ */ e(n.Heading, { as: "h2", children: i("headings.pageTitle") }),
14
15
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
15
- o,
16
+ a,
16
17
  {
17
18
  i18nKey: "listDescription",
18
19
  t: i,
@@ -22,7 +23,7 @@ const D = () => {
22
23
  }
23
24
  ) }),
24
25
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
25
- o,
26
+ a,
26
27
  {
27
28
  i18nKey: "listDescription2",
28
29
  t: i,
@@ -43,6 +44,6 @@ const D = () => {
43
44
  return /* @__PURE__ */ e(h, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ e("header", { children: t }) });
44
45
  };
45
46
  export {
46
- D as Head
47
+ L as Head
47
48
  };
48
49
  //# sourceMappingURL=Head.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n ScheduleLink: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n PaymentLawLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAAC,EAAA,IAASC,EAAA;AACjB,MAAIC,IAAoC,gBAAAC,EAAAC,GAAA,EAAE;AAE1C,UAAQJ,GAAA;AAAA,IACN,KAAK;AACH,MAAAE,IACE,gBAAAG,EAAAD,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAD,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,oBAAoB,GAAE;AAAA,QACrD,gBAAAO,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,cAAc,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACjC;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,gBAAgB,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACnC;AAAA,QAAA,EACF,CACF;AAAA,MAAA,GACF;AAEF;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,yBAAyB,GAAE;AAE5D;AAAA,IACF,KAAK;AACH,MAAAM,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,0BAA0B,GAAE;AAE7D;AAAA,EACF;AAGF,SACE,gBAAAO,EAACI,GAAA,EAAK,gBAAe,iBAAgB,eAAe,UAAU,KAAK,GACjE,UAAA,gBAAAJ,EAAC,UAAA,EAAQ,UAAAD,EAAA,CAAc,GACzB;AAEJ;"}
1
+ {"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n ScheduleLink: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n PaymentLawLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAAC,EAAA,IAASC,EAAA;AACjB,MAAIC,IAAoC,gBAAAC,EAAAC,GAAA,EAAE;AAE1C,UAAQJ,GAAA;AAAA,IACN,KAAK;AACH,MAAAE,IACE,gBAAAG,EAAAD,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAD,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,oBAAoB,GAAE;AAAA,QACrD,gBAAAO,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,cAAc,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACjC;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,gBAAgB,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACnC;AAAA,QAAA,EACF,CACF;AAAA,MAAA,GACF;AAEF;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,yBAAyB,GAAE;AAE5D;AAAA,IACF,KAAK;AACH,MAAAM,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,0BAA0B,GAAE;AAE7D;AAAA,EACF;AAGF,SACE,gBAAAO,EAACI,GAAA,EAAK,gBAAe,iBAAgB,eAAe,UAAU,KAAK,GACjE,UAAA,gBAAAJ,EAAC,UAAA,EAAQ,UAAAD,EAAA,CAAc,GACzB;AAEJ;"}
@@ -4,14 +4,14 @@ import { usePaySchedule as y } from "../usePaySchedule.js";
4
4
  import o from "./List.module.scss.js";
5
5
  import { Flex as s } from "../../../Common/Flex/Flex.js";
6
6
  import "classnames";
7
- import f from "../../../../assets/icons/pencil.svg.js";
8
- import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
- import { VisuallyHidden as v } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
10
- import { HamburgerMenu as g } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
7
+ import { HamburgerMenu as f } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
8
+ import S from "../../../../assets/icons/pencil.svg.js";
9
+ import { useComponentContext as v } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import { VisuallyHidden as g } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
11
  import { useDataView as L } from "../../../Common/DataView/useDataView.js";
12
12
  import { DataView as C } from "../../../Common/DataView/DataView.js";
13
13
  const B = () => {
14
- const { t: n } = h("Company.PaySchedule"), r = S(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
14
+ const { t: n } = h("Company.PaySchedule"), r = v(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
15
15
  data: m || [],
16
16
  columns: [
17
17
  {
@@ -29,13 +29,13 @@ const B = () => {
29
29
  }
30
30
  },
31
31
  {
32
- title: /* @__PURE__ */ e(v, { children: n("payScheduleList.active") }),
32
+ title: /* @__PURE__ */ e(g, { children: n("payScheduleList.active") }),
33
33
  key: "active",
34
34
  render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(r.Badge, { status: "success", children: n("payScheduleList.active") }) : /* @__PURE__ */ e(r.Badge, { status: "info", children: n("payScheduleList.inactive") }) }) })
35
35
  }
36
36
  ],
37
37
  itemMenu: (t) => /* @__PURE__ */ e(
38
- g,
38
+ f,
39
39
  {
40
40
  triggerLabel: "Actions",
41
41
  items: [
@@ -44,7 +44,7 @@ const B = () => {
44
44
  onClick: () => {
45
45
  l(t);
46
46
  },
47
- icon: /* @__PURE__ */ e(f, { "aria-hidden": !0 })
47
+ icon: /* @__PURE__ */ e(S, { "aria-hidden": !0 })
48
48
  }
49
49
  ]
50
50
  }
@@ -5,7 +5,6 @@ import "react-error-boundary";
5
5
  import "react-i18next";
6
6
  import "@gusto/embedded-api/models/errors/apierror";
7
7
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
8
- import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
9
8
  import "@tanstack/react-query";
10
9
  import "../../Base/useBase.js";
11
10
  import "../../../shared/constants.js";
@@ -13,7 +12,7 @@ import "classnames";
13
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
13
  import "dompurify";
15
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const x = o.object({
15
+ const s = o.object({
17
16
  frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
18
17
  anchorPayDate: o.date().optional(),
19
18
  anchorEndOfPayPeriod: o.date().optional(),
@@ -21,10 +20,10 @@ const x = o.object({
21
20
  day2: o.number().min(1).max(31).optional(),
22
21
  customName: o.string().optional(),
23
22
  customTwicePerMonth: o.string().optional()
24
- }), [S, f] = t("PayScheduleContext");
23
+ }), [x, S] = t("PayScheduleContext");
25
24
  export {
26
- f as PayScheduleProvider,
27
- x as PayScheduleSchema,
28
- S as usePaySchedule
25
+ S as PayScheduleProvider,
26
+ s as PayScheduleSchema,
27
+ x as usePaySchedule
29
28
  };
30
29
  //# sourceMappingURL=usePaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
1
+ {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
@@ -1,10 +1,12 @@
1
1
  import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useStateTaxesForm as s } from "./context.js";
4
+ import "../../../../shared/constants.js";
4
5
  import "classnames";
5
6
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function x() {
8
+ import "react";
9
+ function h() {
8
10
  const { t } = a("Company.StateTaxes", { keyPrefix: "form" }), { handleCancel: r, isPending: e } = s(), o = c();
9
11
  return /* @__PURE__ */ i(m, { children: [
10
12
  /* @__PURE__ */ n(o.Button, { variant: "secondary", onClick: r, children: t("cancelCta") }),
@@ -12,6 +14,6 @@ function x() {
12
14
  ] });
13
15
  }
14
16
  export {
15
- x as Actions
17
+ h as Actions
16
18
  };
17
19
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
@@ -4,7 +4,6 @@ import "react-error-boundary";
4
4
  import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
- import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
7
  import "@tanstack/react-query";
9
8
  import "../../../Base/useBase.js";
10
9
  import "../../../../shared/constants.js";
@@ -12,9 +11,9 @@ import "classnames";
12
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
12
  import "dompurify";
14
13
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = t("StateTaxesFormContext");
14
+ const [T, c] = t("StateTaxesFormContext");
16
15
  export {
17
- d as StateTaxesFormProvider,
18
- c as useStateTaxesForm
16
+ c as StateTaxesFormProvider,
17
+ T as useStateTaxesForm
19
18
  };
20
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
@@ -1,14 +1,16 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
3
  import { useStateTaxesList as e } from "./context.js";
4
+ import "../../../../shared/constants.js";
4
5
  import "classnames";
5
6
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function l() {
8
+ import "react";
9
+ function d() {
8
10
  const { t: o } = i("Company.StateTaxes"), n = s(), { handleContinue: r } = e();
9
11
  return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
10
12
  }
11
13
  export {
12
- l as Actions
14
+ d as Actions
13
15
  };
14
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
@@ -1,12 +1,14 @@
1
1
  import { jsx as s, Fragment as p } from "react/jsx-runtime";
2
2
  import { useTranslation as o } from "react-i18next";
3
3
  import { useStateTaxesList as l } from "./context.js";
4
+ import "../../../../shared/constants.js";
4
5
  import "classnames";
5
6
  import { EmptyData as c } from "../../../Common/EmptyData/EmptyData.js";
6
7
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ import "react";
7
9
  import { useDataView as d } from "../../../Common/DataView/useDataView.js";
8
10
  import { DataView as C } from "../../../Common/DataView/DataView.js";
9
- const k = () => {
11
+ const w = () => {
10
12
  const { stateTaxRequirements: r, handleChange: n } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
11
13
  data: r,
12
14
  columns: [
@@ -36,6 +38,6 @@ const k = () => {
36
38
  return /* @__PURE__ */ s(C, { label: t("requirementsListLabel"), ...m });
37
39
  };
38
40
  export {
39
- k as List
41
+ w as List
40
42
  };
41
43
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAKtF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAKtF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
@@ -4,7 +4,6 @@ import "react-error-boundary";
4
4
  import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
- import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
7
  import "@tanstack/react-query";
9
8
  import "../../../Base/useBase.js";
10
9
  import "../../../../shared/constants.js";
@@ -12,9 +11,9 @@ import "classnames";
12
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
12
  import "dompurify";
14
13
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = t("StateTaxesListContext");
14
+ const [T, c] = t("StateTaxesListContext");
16
15
  export {
17
- d as StateTaxesListProvider,
18
- c as useStateTaxesList
16
+ c as StateTaxesListProvider,
17
+ T as useStateTaxesList
19
18
  };
20
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
@@ -13,10 +13,12 @@ import { useComponentDictionary as j, useI18n as q } from "../../../i18n/I18n.js
13
13
  import { Flex as w } from "../../Common/Flex/Flex.js";
14
14
  import "react-i18next";
15
15
  import "classnames";
16
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
17
+ import "react";
16
18
  import { BaseComponent as G } from "../../Base/Base.js";
17
19
  import { useBase as H } from "../../Base/useBase.js";
18
20
  import { contractorEvents as d } from "../../../shared/constants.js";
19
- function it(r) {
21
+ function mt(r) {
20
22
  return /* @__PURE__ */ t(G, { ...r, children: /* @__PURE__ */ t(M, { ...r, children: r.children }) });
21
23
  }
22
24
  function M({ contractorId: r, defaultValues: e, children: n, className: a, dictionary: p }) {
@@ -66,7 +68,7 @@ function M({ contractorId: r, defaultValues: e, children: n, className: a, dicti
66
68
  ) });
67
69
  }
68
70
  export {
69
- it as Address,
70
- it as default
71
+ mt as Address,
72
+ mt as default
71
73
  };
72
74
  //# sourceMappingURL=Address.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Address.js","sources":["../../../../src/components/Contractor/Address/Address.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useContractorsGetSuspense } from '@gusto/embedded-api/react-query/contractorsGet'\nimport { useContractorsGetAddressSuspense } from '@gusto/embedded-api/react-query/contractorsGetAddress'\nimport { useContractorsUpdateAddressMutation } from '@gusto/embedded-api/react-query/contractorsUpdateAddress'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { AddressFormSchema, AddressProvider } from './useAddress'\nimport { Head } from './Head'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { AddressDefaultValues, AddressFormValues } from './useAddress'\nimport { Form as HtmlForm } from '@/components/Common/Form/Form'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { contractorEvents } from '@/shared/constants'\n\nexport interface AddressProps extends BaseComponentInterface<'Contractor.Address'> {\n contractorId: string\n defaultValues?: AddressDefaultValues\n children?: ReactNode\n className?: string\n}\n\nexport function Address(props: AddressProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ contractorId, defaultValues, children, className, dictionary }: AddressProps) {\n useComponentDictionary('Contractor.Address', dictionary)\n useI18n('Contractor.Address')\n\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data: contractorData } = useContractorsGetSuspense({ contractorUuid: contractorId })\n const { data: addressData } = useContractorsGetAddressSuspense({ contractorUuid: contractorId })\n\n const { mutateAsync: updateAddress, isPending: isUpdatingAddressPending } =\n useContractorsUpdateAddressMutation()\n\n const contractor = contractorData.contractor\n const contractorType = contractorData.contractor?.type\n const address = addressData.contractorAddress\n\n const formDefaultValues = {\n street1: address?.street1 || defaultValues?.street1 || '',\n street2: address?.street2 || defaultValues?.street2 || '',\n city: address?.city || defaultValues?.city || '',\n state: address?.state || defaultValues?.state || '',\n zip: address?.zip || defaultValues?.zip || '',\n }\n\n const formMethods = useForm<AddressFormValues>({\n resolver: zodResolver(AddressFormSchema),\n defaultValues: formDefaultValues,\n })\n\n const onSubmit = async (data: AddressFormValues) => {\n await baseSubmitHandler(data, async payload => {\n const { contractorAddress } = await updateAddress({\n request: {\n contractorUuid: contractorId,\n requestBody: {\n version: address?.version as string,\n street1: payload.street1,\n street2: payload.street2,\n city: payload.city,\n state: payload.state,\n zip: payload.zip,\n },\n },\n })\n\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_UPDATED, contractorAddress)\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_DONE)\n })\n }\n\n return (\n <section className={className}>\n <AddressProvider\n value={{\n contractor,\n contractorType,\n address,\n isPending: isUpdatingAddressPending,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </AddressProvider>\n </section>\n )\n}\n\nexport default Address\n"],"names":["Address","props","jsx","BaseComponent","Root","contractorId","defaultValues","children","className","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","contractorData","useContractorsGetSuspense","addressData","useContractorsGetAddressSuspense","updateAddress","isUpdatingAddressPending","useContractorsUpdateAddressMutation","contractor","contractorType","address","formDefaultValues","formMethods","useForm","zodResolver","AddressFormSchema","onSubmit","data","payload","contractorAddress","contractorEvents","AddressProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;AA0BO,SAASA,GAAQC,GAAqB;AAC3C,SACE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A,YACd,OAAOA,EAAQ;AAAA,YACf,KAAKA,EAAQ;AAAA,UAAA;AAAA,QACf;AAAA,MACF,CACD;AAED,MAAApB,EAAQsB,EAAiB,4BAA4BD,CAAiB,GACtErB,EAAQsB,EAAiB,uBAAuB;AAAA,IAClD,CAAC;AAAA,EACH;AAEA,SACE,gBAAAhC,EAAC,aAAQ,WAAAM,GACP,UAAA,gBAAAN;AAAA,IAACiC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,YAAAb;AAAA,QACA,gBAAAC;AAAA,QACA,SAAAC;AAAA,QACA,WAAWJ;AAAA,MAAA;AAAA,MAGb,4BAACgB,GAAA,EAAc,GAAGV,GAChB,UAAA,gBAAAxB,EAACmC,GAAA,EAAS,UAAUX,EAAY,aAAaI,CAAQ,GACnD,UAAA,gBAAA5B,EAACoC,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA/B,KAGC,gBAAAgC,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAtC,EAACuC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Address.js","sources":["../../../../src/components/Contractor/Address/Address.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useContractorsGetSuspense } from '@gusto/embedded-api/react-query/contractorsGet'\nimport { useContractorsGetAddressSuspense } from '@gusto/embedded-api/react-query/contractorsGetAddress'\nimport { useContractorsUpdateAddressMutation } from '@gusto/embedded-api/react-query/contractorsUpdateAddress'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { AddressFormSchema, AddressProvider } from './useAddress'\nimport { Head } from './Head'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { AddressDefaultValues, AddressFormValues } from './useAddress'\nimport { Form as HtmlForm } from '@/components/Common/Form/Form'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { contractorEvents } from '@/shared/constants'\n\nexport interface AddressProps extends BaseComponentInterface<'Contractor.Address'> {\n contractorId: string\n defaultValues?: AddressDefaultValues\n children?: ReactNode\n className?: string\n}\n\nexport function Address(props: AddressProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ contractorId, defaultValues, children, className, dictionary }: AddressProps) {\n useComponentDictionary('Contractor.Address', dictionary)\n useI18n('Contractor.Address')\n\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data: contractorData } = useContractorsGetSuspense({ contractorUuid: contractorId })\n const { data: addressData } = useContractorsGetAddressSuspense({ contractorUuid: contractorId })\n\n const { mutateAsync: updateAddress, isPending: isUpdatingAddressPending } =\n useContractorsUpdateAddressMutation()\n\n const contractor = contractorData.contractor\n const contractorType = contractorData.contractor?.type\n const address = addressData.contractorAddress\n\n const formDefaultValues = {\n street1: address?.street1 || defaultValues?.street1 || '',\n street2: address?.street2 || defaultValues?.street2 || '',\n city: address?.city || defaultValues?.city || '',\n state: address?.state || defaultValues?.state || '',\n zip: address?.zip || defaultValues?.zip || '',\n }\n\n const formMethods = useForm<AddressFormValues>({\n resolver: zodResolver(AddressFormSchema),\n defaultValues: formDefaultValues,\n })\n\n const onSubmit = async (data: AddressFormValues) => {\n await baseSubmitHandler(data, async payload => {\n const { contractorAddress } = await updateAddress({\n request: {\n contractorUuid: contractorId,\n requestBody: {\n version: address?.version as string,\n street1: payload.street1,\n street2: payload.street2,\n city: payload.city,\n state: payload.state,\n zip: payload.zip,\n },\n },\n })\n\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_UPDATED, contractorAddress)\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_DONE)\n })\n }\n\n return (\n <section className={className}>\n <AddressProvider\n value={{\n contractor,\n contractorType,\n address,\n isPending: isUpdatingAddressPending,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </AddressProvider>\n </section>\n )\n}\n\nexport default Address\n"],"names":["Address","props","jsx","BaseComponent","Root","contractorId","defaultValues","children","className","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","contractorData","useContractorsGetSuspense","addressData","useContractorsGetAddressSuspense","updateAddress","isUpdatingAddressPending","useContractorsUpdateAddressMutation","contractor","contractorType","address","formDefaultValues","formMethods","useForm","zodResolver","AddressFormSchema","onSubmit","data","payload","contractorAddress","contractorEvents","AddressProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BO,SAASA,GAAQC,GAAqB;AAC3C,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,cAAAC,GAAc,eAAAC,GAAe,UAAAC,GAAU,WAAAC,GAAW,YAAAC,KAA4B;AAC5F,EAAAC,EAAuB,sBAAsBD,CAAU,GACvDE,EAAQ,oBAAoB;AAE5B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAMC,EAAA,IAAmBC,EAA0B,EAAE,gBAAgBX,GAAc,GACrF,EAAE,MAAMY,EAAA,IAAgBC,EAAiC,EAAE,gBAAgBb,GAAc,GAEzF,EAAE,aAAac,GAAe,WAAWC,EAAA,IAC7CC,EAAA,GAEIC,IAAaP,E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KAAK,IAC/B,UAAA/B,KAGC,gBAAAgC,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAtC,EAACuC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,13 +1,15 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import { useTranslation as i } from "react-i18next";
3
- import { Grid as o } from "../../Common/Grid/Grid.js";
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
+ import { useTranslation as s } from "react-i18next";
3
+ import { STATES_ABBR as o } from "../../../shared/constants.js";
4
+ import { Grid as l } from "../../Common/Grid/Grid.js";
4
5
  import "classnames";
5
- import { STATES_ABBR as l } from "../../../shared/constants.js";
6
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import "react";
6
8
  import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
7
9
  import { SelectField as m } from "../../Common/Fields/SelectField/SelectField.js";
8
- function v() {
9
- const { t: e } = i("Contractor.Address");
10
- return /* @__PURE__ */ s(o, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
10
+ function T() {
11
+ const { t: e } = s("Contractor.Address");
12
+ return /* @__PURE__ */ i(l, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
11
13
  /* @__PURE__ */ r(
12
14
  t,
13
15
  {
@@ -31,7 +33,7 @@ function v() {
31
33
  m,
32
34
  {
33
35
  name: "state",
34
- options: l.map((a) => ({
36
+ options: o.map((a) => ({
35
37
  label: e(`statesHash.${a}`, { ns: "common", defaultValue: a }),
36
38
  value: a
37
39
  })),
@@ -45,6 +47,6 @@ function v() {
45
47
  ] });
46
48
  }
47
49
  export {
48
- v as Form
50
+ T as Form
49
51
  };
50
52
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../src/components/Contractor/Address/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { TextInputField, SelectField, Grid } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\n\nexport function Form() {\n const { t } = useTranslation('Contractor.Address')\n\n return (\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n label={t('city')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map(stateAbbr => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common', defaultValue: stateAbbr }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField name=\"zip\" label={t('zip')} isRequired errorMessage={t('validations.zip')} />\n </Grid>\n )\n}\n"],"names":["Form","t","useTranslation","jsxs","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr"],"mappings":";;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB;AAEjD,SACE,gBAAAC,EAACC,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,SAAS;AAAA,QAClB,YAAU;AAAA,QACV,cAAcA,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,sBAEtCK,GAAA,EAAe,MAAK,WAAU,OAAOL,EAAE,SAAS,GAAG;AAAA,IACpD,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,MAAM;AAAA,QACf,YAAU;AAAA,QACV,cAAcA,EAAE,kBAAkB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEpC,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAASC,EAAY,IAAI,CAAAC,OAAc;AAAA,UACrC,OAAOR,EAAE,cAAcQ,CAAS,IAAI,EAAE,IAAI,UAAU,cAAcA,GAAW;AAAA,UAC7E,OAAOA;AAAA,QAAA,EACP;AAAA,QACF,OAAOR,EAAE,OAAO;AAAA,QAChB,aAAaA,EAAE,kBAAkB;AAAA,QACjC,cAAcA,EAAE,mBAAmB;AAAA,QACnC,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI,EAACC,GAAA,EAAe,MAAK,OAAM,OAAOL,EAAE,KAAK,GAAG,YAAU,IAAC,cAAcA,EAAE,iBAAiB,EAAA,CAAG;AAAA,EAAA,GAC7F;AAEJ;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../src/components/Contractor/Address/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { TextInputField, SelectField, Grid } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\n\nexport function Form() {\n const { t } = useTranslation('Contractor.Address')\n\n return (\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n label={t('city')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map(stateAbbr => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common', defaultValue: stateAbbr }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField name=\"zip\" label={t('zip')} isRequired errorMessage={t('validations.zip')} />\n </Grid>\n )\n}\n"],"names":["Form","t","useTranslation","jsxs","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr"],"mappings":";;;;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB;AAEjD,SACE,gBAAAC,EAACC,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,SAAS;AAAA,QAClB,YAAU;AAAA,QACV,cAAcA,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,sBAEtCK,GAAA,EAAe,MAAK,WAAU,OAAOL,EAAE,SAAS,GAAG;AAAA,IACpD,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,MAAM;AAAA,QACf,YAAU;AAAA,QACV,cAAcA,EAAE,kBAAkB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEpC,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAASC,EAAY,IAAI,CAAAC,OAAc;AAAA,UACrC,OAAOR,EAAE,cAAcQ,CAAS,IAAI,EAAE,IAAI,UAAU,cAAcA,GAAW;AAAA,UAC7E,OAAOA;AAAA,QAAA,EACP;AAAA,QACF,OAAOR,EAAE,OAAO;AAAA,QAChB,aAAaA,EAAE,kBAAkB;AAAA,QACjC,cAAcA,EAAE,mBAAmB;AAAA,QACnC,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI,EAACC,GAAA,EAAe,MAAK,OAAM,OAAOL,EAAE,KAAK,GAAG,YAAU,IAAC,cAAcA,EAAE,iBAAiB,EAAA,CAAG;AAAA,EAAA,GAC7F;AAEJ;"}