@gusto/embedded-react-sdk 0.35.0-rc.4 → 0.36.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (625) hide show
  1. package/CHANGELOG.md +20 -11
  2. package/README.md +2 -0
  3. package/dist/UNSTABLE_Hooks.d.ts +1 -1
  4. package/dist/UNSTABLE_Hooks.js +48 -6
  5. package/dist/UNSTABLE_Hooks.js.map +1 -1
  6. package/dist/components/Base/Base.d.ts +8 -9
  7. package/dist/components/Base/Base.js +123 -102
  8. package/dist/components/Base/Base.js.map +1 -1
  9. package/dist/components/Base/index.d.ts +1 -1
  10. package/dist/components/Base/useBase.d.ts +3 -7
  11. package/dist/components/Base/useBase.js.map +1 -1
  12. package/dist/components/Base/useBaseSubmit.d.ts +3 -5
  13. package/dist/components/Base/useBaseSubmit.js +27 -50
  14. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  15. package/dist/components/Common/Fields/CheckboxField/CheckboxField.d.ts +2 -0
  16. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +17 -16
  17. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
  18. package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +5 -3
  19. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +46 -36
  20. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
  21. package/dist/components/Common/Fields/NumberInputField/NumberInputField.d.ts +2 -0
  22. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +21 -20
  23. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
  24. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +3 -1
  25. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +20 -19
  26. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  27. package/dist/components/Common/Fields/SelectField/SelectField.d.ts +3 -1
  28. package/dist/components/Common/Fields/SelectField/SelectField.js +19 -18
  29. package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
  30. package/dist/components/Common/Fields/SwitchField/SwitchField.d.ts +2 -0
  31. package/dist/components/Common/Fields/SwitchField/SwitchField.js +19 -18
  32. package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
  33. package/dist/components/Common/Fields/TextInputField/TextInputField.d.ts +2 -0
  34. package/dist/components/Common/Fields/TextInputField/TextInputField.js +10 -9
  35. package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
  36. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
  37. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  38. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -14
  39. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  40. package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -19
  41. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  42. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
  43. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
  44. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  45. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -10
  46. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -11
  48. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
  50. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  52. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -5
  54. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -9
  55. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  56. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
  57. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  58. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -14
  59. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -5
  61. package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -5
  62. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -5
  64. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -11
  65. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  66. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
  67. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  68. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -5
  69. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -13
  70. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  71. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +12 -15
  72. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  73. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
  74. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -8
  76. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  77. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
  78. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  79. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -5
  80. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
  81. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  82. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -5
  83. package/dist/components/Company/FederalTaxes/Actions.js +8 -11
  84. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  85. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -19
  86. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  87. package/dist/components/Company/FederalTaxes/Form.js +6 -8
  88. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  89. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -5
  90. package/dist/components/Company/Industry/Actions.js +8 -11
  91. package/dist/components/Company/Industry/Actions.js.map +1 -1
  92. package/dist/components/Company/Industry/Context.js +5 -5
  93. package/dist/components/Company/Industry/Edit.js +10 -14
  94. package/dist/components/Company/Industry/Edit.js.map +1 -1
  95. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -11
  96. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  97. package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
  98. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  99. package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
  100. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  101. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -5
  102. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -9
  103. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationsList/List.js +17 -19
  105. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
  107. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -5
  109. package/dist/components/Company/OnboardingOverview/Completed.js +12 -15
  110. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  111. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
  112. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  113. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
  114. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  115. package/dist/components/Company/OnboardingOverview/context.js +5 -5
  116. package/dist/components/Company/PaySchedule/PaySchedule.js +60 -63
  117. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  118. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -13
  119. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  120. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  121. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
  122. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  123. package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
  124. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  125. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -5
  126. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -8
  127. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  128. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -5
  129. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -9
  130. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  131. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -8
  132. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  133. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -5
  134. package/dist/components/Contractor/Address/Address.js +3 -7
  135. package/dist/components/Contractor/Address/Address.js.map +1 -1
  136. package/dist/components/Contractor/Address/Form.js +6 -8
  137. package/dist/components/Contractor/Address/Form.js.map +1 -1
  138. package/dist/components/Contractor/Address/useAddress.js +5 -5
  139. package/dist/components/Contractor/ContractorList/index.js +29 -30
  140. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  141. package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
  142. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  143. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -14
  144. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  145. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  146. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  147. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
  148. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  149. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +12 -14
  150. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  151. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  152. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
  153. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  154. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
  155. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  156. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
  157. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  158. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
  159. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  160. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
  161. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  162. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -5
  163. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  164. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  165. package/dist/components/Contractor/Profile/useContractorProfile.js +33 -31
  166. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  167. package/dist/components/Contractor/Submit/Submit.js +20 -22
  168. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  169. package/dist/components/Employee/Compensation/Actions.js +12 -14
  170. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  171. package/dist/components/Employee/Compensation/Edit.js +27 -28
  172. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  173. package/dist/components/Employee/Compensation/List.js +23 -25
  174. package/dist/components/Employee/Compensation/List.js.map +1 -1
  175. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +12 -12
  176. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +13 -13
  177. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +13 -13
  178. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
  179. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  180. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -7
  181. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  182. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -9
  183. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  184. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
  185. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  186. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
  187. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  188. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -5
  189. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
  190. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  191. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +9 -11
  192. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  193. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
  194. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  195. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -5
  196. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
  197. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  198. package/dist/components/Employee/EmployeeList/Actions.js +6 -9
  199. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  200. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -7
  201. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  202. package/dist/components/Employee/EmployeeList/Head.js +5 -8
  203. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  204. package/dist/components/Employee/EmployeeList/List.js +16 -17
  205. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  206. package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -5
  207. package/dist/components/Employee/FederalTaxes/Actions.js +7 -10
  208. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  209. package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -13
  210. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  211. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +42 -42
  212. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  213. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +5 -5
  214. package/dist/components/Employee/Landing/Landing.js +14 -15
  215. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  216. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  217. package/dist/components/Employee/PaymentMethod/Actions.js +8 -11
  218. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  219. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
  220. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  221. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -10
  222. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  223. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
  224. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  225. package/dist/components/Employee/PaymentMethod/Split.js +9 -10
  226. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  227. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -5
  228. package/dist/components/Employee/Profile/Actions.js +8 -11
  229. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  230. package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -17
  231. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  232. package/dist/components/Employee/Profile/HomeAddress.d.ts +3 -3
  233. package/dist/components/Employee/Profile/HomeAddress.js +45 -44
  234. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  235. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -13
  236. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  237. package/dist/components/Employee/Profile/Profile.js +30 -29
  238. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  239. package/dist/components/Employee/Profile/useProfile.js +5 -5
  240. package/dist/components/Employee/StateTaxes/Actions.js +8 -11
  241. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  242. package/dist/components/Employee/StateTaxes/StateTaxes.js +50 -50
  243. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  244. package/dist/components/Employee/StateTaxes/useStateTaxes.js +5 -5
  245. package/dist/components/Employee/Taxes/Actions.js +8 -11
  246. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  247. package/dist/components/Employee/Taxes/FederalForm.js +10 -13
  248. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  249. package/dist/components/Employee/Taxes/Taxes.js +53 -53
  250. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  251. package/dist/components/Employee/Taxes/useTaxes.js +5 -5
  252. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +11 -0
  253. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +123 -0
  254. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -0
  255. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +11 -0
  256. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +89 -0
  257. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -0
  258. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +2 -0
  259. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +30 -0
  260. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -0
  261. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +23 -0
  262. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +70 -0
  263. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -0
  264. package/dist/components/Employee/Terminations/TerminationFlow/index.d.ts +3 -0
  265. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +7 -0
  266. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +165 -0
  267. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -0
  268. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.test.d.ts +1 -0
  269. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +9 -0
  270. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +86 -0
  271. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -0
  272. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +20 -0
  273. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +100 -0
  274. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -0
  275. package/dist/components/Employee/Terminations/TerminationsData.d.ts +6 -0
  276. package/dist/components/Employee/Terminations/index.d.ts +8 -0
  277. package/dist/components/Employee/Terminations/types.d.ts +1 -0
  278. package/dist/components/Employee/index.d.ts +7 -0
  279. package/dist/components/Employee/index.js +34 -28
  280. package/dist/components/Employee/index.js.map +1 -1
  281. package/dist/components/Flow/Flow.js +20 -23
  282. package/dist/components/Flow/Flow.js.map +1 -1
  283. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
  284. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  285. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
  286. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  287. package/dist/components/InformationRequests/InformationRequests.js +34 -35
  288. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  289. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +41 -41
  290. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  291. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
  292. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  293. package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +2 -0
  294. package/dist/components/Payroll/Dismissal/DismissalFlow.js +32 -0
  295. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -0
  296. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +16 -0
  297. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +52 -0
  298. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -0
  299. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +6 -0
  300. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +69 -0
  301. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -0
  302. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +9 -0
  303. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +50 -0
  304. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -0
  305. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/index.d.ts +3 -0
  306. package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +6 -0
  307. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +51 -0
  308. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -0
  309. package/dist/components/Payroll/Dismissal/dismissalStateMachine.test.d.ts +1 -0
  310. package/dist/components/Payroll/Dismissal/index.d.ts +3 -0
  311. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +25 -23
  312. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  313. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
  314. package/dist/components/Payroll/OffCycle/OffCycleFlow.js +19 -18
  315. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  316. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +3 -0
  317. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +32 -24
  318. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  319. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +45 -45
  320. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  321. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  322. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +75 -68
  323. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  324. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js +8 -0
  325. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js.map +1 -0
  326. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +0 -1
  327. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +5 -9
  328. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  329. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +4 -4
  330. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +2 -2
  331. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
  332. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +1 -0
  333. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +1 -0
  334. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
  335. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -9
  336. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  337. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -14
  338. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  339. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
  340. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  341. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  342. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +186 -159
  343. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  344. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -3
  345. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +71 -71
  346. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  347. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +3 -2
  348. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js +8 -8
  349. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -1
  350. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +5 -3
  351. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +76 -70
  352. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  353. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +47 -42
  354. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  355. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -2
  356. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +235 -196
  357. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  358. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +19 -21
  359. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  360. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
  361. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +12 -0
  362. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -0
  363. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -0
  364. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  365. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +1 -0
  366. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +21 -0
  367. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -0
  368. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  369. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +95 -64
  370. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  371. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +53 -47
  372. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  373. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +38 -40
  374. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  375. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +25 -23
  376. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  377. package/dist/components/Payroll/PayrollList/PayrollList.js +40 -32
  378. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  379. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -1
  380. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +110 -95
  381. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  382. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +12 -8
  383. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  384. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +2 -3
  385. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  386. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +4 -4
  387. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
  388. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  389. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
  390. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  391. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
  392. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  393. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
  394. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  395. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
  396. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  397. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +2 -0
  398. package/dist/components/Payroll/Transition/TransitionFlow.js +38 -0
  399. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -0
  400. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +19 -0
  401. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +54 -0
  402. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -0
  403. package/dist/components/Payroll/Transition/index.d.ts +3 -0
  404. package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +6 -0
  405. package/dist/components/Payroll/Transition/transitionStateMachine.js +58 -0
  406. package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -0
  407. package/dist/components/Payroll/Transition/transitionStateMachine.test.d.ts +1 -0
  408. package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +2 -0
  409. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +92 -0
  410. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -0
  411. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +2 -0
  412. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +109 -0
  413. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -0
  414. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js +8 -0
  415. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js.map +1 -0
  416. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +28 -0
  417. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +21 -0
  418. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -0
  419. package/dist/components/Payroll/TransitionCreation/index.d.ts +3 -0
  420. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +8 -0
  421. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +83 -0
  422. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -0
  423. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +16 -0
  424. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +100 -0
  425. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -0
  426. package/dist/components/Payroll/TransitionPayrollAlert/index.d.ts +2 -0
  427. package/dist/components/Payroll/helpers.d.ts +2 -1
  428. package/dist/components/Payroll/helpers.js +98 -87
  429. package/dist/components/Payroll/helpers.js.map +1 -1
  430. package/dist/components/Payroll/index.d.ts +6 -0
  431. package/dist/components/Payroll/index.js +32 -26
  432. package/dist/components/Payroll/index.js.map +1 -1
  433. package/dist/components/Payroll/payrollTypes.d.ts +21 -0
  434. package/dist/components/Payroll/payrollTypes.js +27 -0
  435. package/dist/components/Payroll/payrollTypes.js.map +1 -0
  436. package/dist/components/Payroll/usePreparedPayrollData.js +6 -7
  437. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  438. package/dist/components/UNSTABLE_Hooks/collectErrors.d.ts +6 -0
  439. package/dist/components/UNSTABLE_Hooks/collectErrors.js +9 -0
  440. package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +1 -0
  441. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +8 -0
  442. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +13 -0
  443. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -0
  444. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +10 -0
  445. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js +13 -0
  446. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -0
  447. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +23 -0
  448. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js +24 -0
  449. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -0
  450. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +26 -0
  451. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +24 -0
  452. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +1 -0
  453. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.d.ts +53 -0
  454. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +34 -0
  455. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +1 -0
  456. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.test.d.ts +1 -0
  457. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +3 -0
  458. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +14 -0
  459. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -0
  460. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.test.d.ts +1 -0
  461. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +9 -0
  462. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +29 -0
  463. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -0
  464. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +9 -0
  465. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +29 -0
  466. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -0
  467. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +12 -0
  468. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +35 -0
  469. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -0
  470. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +10 -0
  471. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +35 -0
  472. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -0
  473. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +10 -0
  474. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +35 -0
  475. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -0
  476. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +9 -0
  477. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +29 -0
  478. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -0
  479. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +11 -0
  480. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +33 -0
  481. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -0
  482. package/dist/components/UNSTABLE_Hooks/form/fields/index.d.ts +15 -0
  483. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +2 -0
  484. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js +8 -0
  485. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -0
  486. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.d.ts +18 -0
  487. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js +10 -0
  488. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +1 -0
  489. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.test.d.ts +1 -0
  490. package/dist/components/UNSTABLE_Hooks/form/index.d.ts +14 -0
  491. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +6 -0
  492. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +14 -0
  493. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +1 -0
  494. package/dist/components/UNSTABLE_Hooks/form/types.d.ts +27 -0
  495. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +2 -0
  496. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +17 -0
  497. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -0
  498. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +4 -0
  499. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +9 -0
  500. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +1 -0
  501. package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +5 -0
  502. package/dist/components/UNSTABLE_Hooks/form/withOptions.js +7 -0
  503. package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -0
  504. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +5 -0
  505. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +149 -0
  506. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -0
  507. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +97 -0
  508. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +121 -0
  509. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -0
  510. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +34 -0
  511. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js +50 -0
  512. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -0
  513. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +7 -0
  514. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +104 -0
  515. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +259 -0
  516. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -0
  517. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +5 -0
  518. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +112 -0
  519. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -0
  520. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +39 -0
  521. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +45 -0
  522. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
  523. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +23 -0
  524. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +46 -0
  525. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -0
  526. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +7 -0
  527. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +77 -0
  528. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +153 -0
  529. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
  530. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +5 -0
  531. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +69 -0
  532. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -0
  533. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +10 -0
  534. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js +14 -0
  535. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -0
  536. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +7 -0
  537. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +68 -0
  538. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +129 -0
  539. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
  540. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +25 -0
  541. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +24 -0
  542. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -0
  543. package/dist/components/UNSTABLE_Hooks/index.d.ts +9 -0
  544. package/dist/components/UNSTABLE_Hooks/types.d.ts +49 -0
  545. package/dist/components/UNSTABLE_Hooks/useErrorHandling.d.ts +9 -0
  546. package/dist/components/UNSTABLE_Hooks/useErrorHandling.js +12 -0
  547. package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +1 -0
  548. package/dist/components/UNSTABLE_Hooks/useErrorHandling.test.d.ts +1 -0
  549. package/dist/contexts/ApiProvider/ApiProvider.js +11 -11
  550. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  551. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +43 -50
  552. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  553. package/dist/contexts/ObservabilityProvider/index.d.ts +1 -1
  554. package/dist/contexts/ObservabilityProvider/sanitization.d.ts +0 -14
  555. package/dist/contexts/ObservabilityProvider/sanitization.js +51 -51
  556. package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -1
  557. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.d.ts +0 -3
  558. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js.map +1 -1
  559. package/dist/helpers/requiredIf.d.ts +13 -0
  560. package/dist/helpers/requiredIf.js +8 -0
  561. package/dist/helpers/requiredIf.js.map +1 -0
  562. package/dist/i18n/I18n.js +13 -13
  563. package/dist/i18n/I18n.js.map +1 -1
  564. package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js +18 -0
  565. package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js.map +1 -0
  566. package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js +12 -0
  567. package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js.map +1 -0
  568. package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js +20 -0
  569. package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js.map +1 -0
  570. package/dist/i18n/en/Payroll.Dismissal.json.js +22 -0
  571. package/dist/i18n/en/Payroll.Dismissal.json.js.map +1 -0
  572. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +15 -11
  573. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
  574. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +1 -1
  575. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -18
  576. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  577. package/dist/i18n/en/Payroll.PayrollList.json.js +20 -18
  578. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  579. package/dist/i18n/en/Payroll.Transition.json.js +8 -0
  580. package/dist/i18n/en/Payroll.Transition.json.js.map +1 -0
  581. package/dist/i18n/en/Payroll.TransitionCreation.json.js +26 -0
  582. package/dist/i18n/en/Payroll.TransitionCreation.json.js.map +1 -0
  583. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +18 -0
  584. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js.map +1 -0
  585. package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +58 -0
  586. package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +1 -0
  587. package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +34 -0
  588. package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +1 -0
  589. package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +24 -0
  590. package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +1 -0
  591. package/dist/i18n/en/common.json.d.ts +2 -1
  592. package/dist/i18n/en/common.json.js +9 -9
  593. package/dist/index.d.ts +3 -2
  594. package/dist/index.js +14 -13
  595. package/dist/models/WA_RISK_CODES.d.ts +5 -2866
  596. package/dist/models/WA_RISK_CODES.js.map +1 -1
  597. package/dist/shared/constants.d.ts +32 -0
  598. package/dist/shared/constants.js +83 -65
  599. package/dist/shared/constants.js.map +1 -1
  600. package/dist/style.css +1 -1
  601. package/dist/types/i18next.d.ts +279 -1
  602. package/dist/types/observability.d.ts +31 -65
  603. package/dist/types/sdkError.d.ts +97 -0
  604. package/dist/types/sdkError.js +95 -0
  605. package/dist/types/sdkError.js.map +1 -0
  606. package/dist/types/sdkError.test.d.ts +1 -0
  607. package/docs/reference/endpoint-inventory.json +212 -14
  608. package/package.json +16 -16
  609. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +0 -6
  610. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +0 -70
  611. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +0 -1
  612. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +0 -7
  613. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +0 -6
  614. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +0 -1
  615. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +0 -9
  616. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +0 -40
  617. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +0 -1
  618. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +0 -5
  619. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +0 -2
  620. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +0 -12
  621. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +0 -1
  622. package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +0 -2
  623. package/dist/contexts/ObservabilityProvider/observabilityUtils.d.ts +0 -5
  624. package/dist/contexts/ObservabilityProvider/observabilityUtils.js +0 -45
  625. package/dist/contexts/ObservabilityProvider/observabilityUtils.js.map +0 -1
@@ -1,16 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as i } from "react-i18next";
3
- import { useIndustryApiState as m } from "./Context.js";
4
- import "../../../shared/constants.js";
5
- import "classnames";
6
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import "react";
9
- const l = () => {
10
- const { t: o } = i("Company.Industry"), { isPending: n } = m(), r = p();
11
- return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
2
+ import { useTranslation as s } from "react-i18next";
3
+ import { useIndustryApiState as i } from "./Context.js";
4
+ import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
5
+ import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ const f = () => {
7
+ const { t: o } = s("Company.Industry"), { isPending: n } = i(), r = e();
8
+ return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
12
9
  };
13
10
  export {
14
- l as Actions
11
+ f as Actions
15
12
  };
16
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
@@ -2,16 +2,16 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
- import "@gusto/embedded-api/models/errors/gustoembeddederror";
6
- import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
5
  import "@tanstack/react-query";
8
6
  import "../../Base/useBase.js";
7
+ import "@gusto/embedded-api/models/errors/apierror";
8
+ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
+ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
11
+ import "@gusto/embedded-api/models/errors/httpclienterrors";
9
12
  import "../../../shared/constants.js";
10
- import "classnames";
11
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
14
  import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
- import "dompurify";
14
- import "../../../contexts/LocaleProvider/useLocale.js";
15
15
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
16
  const [P, f] = t("IndustryItems", {
17
17
  items: []
@@ -1,18 +1,14 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as e } from "react-i18next";
3
- import { useIndustryItems as m } from "./Context.js";
4
- import "../../../shared/constants.js";
5
- import "classnames";
6
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- import "react";
8
- import { ComboBoxField as i } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
9
- const f = () => {
10
- const { t: o } = e("Company.Industry"), { items: r } = m();
11
- return /* @__PURE__ */ t(
12
- i,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useTranslation as t } from "react-i18next";
3
+ import { useIndustryItems as s } from "./Context.js";
4
+ import { ComboBoxField as m } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
5
+ const p = () => {
6
+ const { t: o } = t("Company.Industry"), { items: e } = s();
7
+ return /* @__PURE__ */ r(
8
+ m,
13
9
  {
14
10
  isRequired: !0,
15
- options: r,
11
+ options: e,
16
12
  label: o("label"),
17
13
  name: "naics_code",
18
14
  placeholder: o("placeholder")
@@ -20,6 +16,6 @@ const f = () => {
20
16
  );
21
17
  };
22
18
  export {
23
- f as Edit
19
+ p as Edit
24
20
  };
25
21
  //# sourceMappingURL=Edit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAA,IAAUC,EAAA;AAElB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAAA;AAGlC;"}
1
+ {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAA,IAAUC,EAAA;AAElB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAAA;AAGlC;"}
@@ -1,19 +1,16 @@
1
- import { jsxs as s, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useLocationsForm as e } from "./useLocationForm.js";
4
- import "../../../../shared/constants.js";
5
- import "classnames";
6
- import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import "react";
9
- const y = () => {
10
- const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: r } = e(), t = c();
11
- return /* @__PURE__ */ s(m, { children: [
4
+ import { ActionsLayout as c } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ const f = () => {
7
+ const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = m();
8
+ return /* @__PURE__ */ r(c, { children: [
12
9
  /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("cancelCta") }),
13
- /* @__PURE__ */ n(t.Button, { type: "submit", isLoading: r, "data-testid": "location-submit", children: o("saveCta") })
10
+ /* @__PURE__ */ n(t.Button, { type: "submit", isLoading: s, "data-testid": "location-submit", children: o("saveCta") })
14
11
  ] });
15
12
  };
16
13
  export {
17
- y as Actions
14
+ f as Actions
18
15
  };
19
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\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 type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,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,UAAAF,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAAH,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\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 type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,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,UAAAF,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAAH,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
@@ -4,14 +4,12 @@ import { useTranslation as l } from "react-i18next";
4
4
  import { zipValidation as n, phoneValidation as m } from "../../../../helpers/validations.js";
5
5
  import { Flex as d } from "../../../Common/Flex/Flex.js";
6
6
  import { Grid as p } from "../../../Common/Grid/Grid.js";
7
- import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
8
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
- import "react";
10
7
  import { STATES_ABBR as c } from "../../../../shared/constants.js";
11
8
  import { useMaskedTransform as u, commonMasks as b } from "../../../../helpers/mask.js";
9
+ import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
12
10
  import { SelectField as f } from "../../../Common/Fields/SelectField/SelectField.js";
13
11
  import { CheckboxGroupField as g } from "../../../Common/Fields/CheckboxGroupField/CheckboxGroupField.js";
14
- const S = i.object({
12
+ const q = i.object({
15
13
  phoneNumber: m,
16
14
  street1: i.string().min(1),
17
15
  street2: i.string().optional(),
@@ -20,7 +18,7 @@ const S = i.object({
20
18
  zip: n,
21
19
  addressType: i.array(i.enum(["mailingAddress", "filingAddress"])).optional()
22
20
  });
23
- function j() {
21
+ function k() {
24
22
  const { t: e } = l("Company.Locations"), o = u(b.phoneMask);
25
23
  return /* @__PURE__ */ t(d, { flexDirection: "column", gap: 20, children: [
26
24
  /* @__PURE__ */ t(
@@ -106,7 +104,7 @@ function j() {
106
104
  ] });
107
105
  }
108
106
  export {
109
- j as Form,
110
- S as LocationFormSchema
107
+ k as Form,
108
+ q as LocationFormSchema
111
109
  };
112
110
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { phoneValidation, zipValidation } from '@/helpers/validations'\nimport { CheckboxGroupField, Flex, Grid, SelectField, TextInputField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\n\nexport const LocationFormSchema = z.object({\n phoneNumber: phoneValidation,\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: zipValidation,\n addressType: z.array(z.enum(['mailingAddress', 'filingAddress'])).optional(),\n})\n\nexport type LocationFormInputs = z.infer<typeof LocationFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.Locations')\n const transform = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Grid\n gap={{ base: 20, small: 8 }}\n gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }}\n >\n <TextInputField\n name=\"street1\"\n isRequired\n label={t('street1Label')}\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2Label')} />\n <TextInputField\n name=\"city\"\n label={t('cityLabel')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('stateLabel')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n isRequired\n label={t('zipLabel')}\n errorMessage={t('validations.zip')}\n />\n <TextInputField\n name=\"phoneNumber\"\n isRequired\n label={t('phoneNumberLabel')}\n errorMessage={t('validations.phone')}\n transform={transform}\n />\n </Grid>\n <CheckboxGroupField\n name=\"addressType\"\n label={t('addressTypeLabel')}\n options={[\n {\n value: 'mailingAddress',\n label: t('mailingAddressLabel'),\n description: t('mailingAddressDescription'),\n },\n {\n value: 'filingAddress',\n label: t('filingAddressLabel'),\n description: t('filingAddressDescription'),\n },\n ]}\n />\n </Flex>\n )\n}\n"],"names":["LocationFormSchema","z","phoneValidation","zipValidation","Form","t","useTranslation","transform","useMaskedTransform","commonMasks","jsxs","Flex","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr","CheckboxGroupField"],"mappings":";;;;;;;;;;;;;AAOO,MAAMA,IAAqBC,EAAE,OAAO;AAAA,EACzC,aAAaC;AAAA,EACb,SAASD,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKE;AAAA,EACL,aAAaF,EAAE,MAAMA,EAAE,KAAK,CAAC,kBAAkB,eAAe,CAAC,CAAC,EAAE,SAAA;AACpE,CAAC;AAIM,SAASG,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1CC,IAAYC,EAAmBC,EAAY,SAAS;AAE1D,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,KAAK,EAAE,MAAM,IAAI,OAAO,EAAA;AAAA,QACxB,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA;AAAA,QAExD,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,cAAc;AAAA,cACvB,cAAcA,EAAE,qBAAqB;AAAA,YAAA;AAAA,UAAA;AAAA,4BAEtCS,GAAA,EAAe,MAAK,WAAU,OAAOT,EAAE,cAAc,GAAG;AAAA,UACzD,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAOT,EAAE,WAAW;AAAA,cACpB,YAAU;AAAA,cACV,cAAcA,EAAE,kBAAkB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEpC,gBAAAQ;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASC,EAAY,IAAI,CAACC,OAA6C;AAAA,gBACrE,OAAOZ,EAAE,cAAcY,CAAS,IAAI,EAAE,IAAI,UAAU;AAAA,gBACpD,OAAOA;AAAA,cAAA,EACP;AAAA,cACF,OAAOZ,EAAE,YAAY;AAAA,cACrB,aAAaA,EAAE,kBAAkB;AAAA,cACjC,cAAcA,EAAE,mBAAmB;AAAA,cACnC,YAAU;AAAA,YAAA;AAAA,UAAA;AAAA,UAEZ,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,UAAU;AAAA,cACnB,cAAcA,EAAE,iBAAiB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEnC,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,kBAAkB;AAAA,cAC3B,cAAcA,EAAE,mBAAmB;AAAA,cACnC,WAAAE;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAM;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOb,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,qBAAqB;AAAA,YAC9B,aAAaA,EAAE,2BAA2B;AAAA,UAAA;AAAA,UAE5C;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,oBAAoB;AAAA,YAC7B,aAAaA,EAAE,0BAA0B;AAAA,UAAA;AAAA,QAC3C;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { phoneValidation, zipValidation } from '@/helpers/validations'\nimport { CheckboxGroupField, Flex, Grid, SelectField, TextInputField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\n\nexport const LocationFormSchema = z.object({\n phoneNumber: phoneValidation,\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: zipValidation,\n addressType: z.array(z.enum(['mailingAddress', 'filingAddress'])).optional(),\n})\n\nexport type LocationFormInputs = z.infer<typeof LocationFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.Locations')\n const transform = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Grid\n gap={{ base: 20, small: 8 }}\n gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }}\n >\n <TextInputField\n name=\"street1\"\n isRequired\n label={t('street1Label')}\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2Label')} />\n <TextInputField\n name=\"city\"\n label={t('cityLabel')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('stateLabel')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n isRequired\n label={t('zipLabel')}\n errorMessage={t('validations.zip')}\n />\n <TextInputField\n name=\"phoneNumber\"\n isRequired\n label={t('phoneNumberLabel')}\n errorMessage={t('validations.phone')}\n transform={transform}\n />\n </Grid>\n <CheckboxGroupField\n name=\"addressType\"\n label={t('addressTypeLabel')}\n options={[\n {\n value: 'mailingAddress',\n label: t('mailingAddressLabel'),\n description: t('mailingAddressDescription'),\n },\n {\n value: 'filingAddress',\n label: t('filingAddressLabel'),\n description: t('filingAddressDescription'),\n },\n ]}\n />\n </Flex>\n )\n}\n"],"names":["LocationFormSchema","z","phoneValidation","zipValidation","Form","t","useTranslation","transform","useMaskedTransform","commonMasks","jsxs","Flex","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr","CheckboxGroupField"],"mappings":";;;;;;;;;;;AAOO,MAAMA,IAAqBC,EAAE,OAAO;AAAA,EACzC,aAAaC;AAAA,EACb,SAASD,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKE;AAAA,EACL,aAAaF,EAAE,MAAMA,EAAE,KAAK,CAAC,kBAAkB,eAAe,CAAC,CAAC,EAAE,SAAA;AACpE,CAAC;AAIM,SAASG,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1CC,IAAYC,EAAmBC,EAAY,SAAS;AAE1D,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,KAAK,EAAE,MAAM,IAAI,OAAO,EAAA;AAAA,QACxB,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA;AAAA,QAExD,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,cAAc;AAAA,cACvB,cAAcA,EAAE,qBAAqB;AAAA,YAAA;AAAA,UAAA;AAAA,4BAEtCS,GAAA,EAAe,MAAK,WAAU,OAAOT,EAAE,cAAc,GAAG;AAAA,UACzD,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAOT,EAAE,WAAW;AAAA,cACpB,YAAU;AAAA,cACV,cAAcA,EAAE,kBAAkB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEpC,gBAAAQ;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASC,EAAY,IAAI,CAACC,OAA6C;AAAA,gBACrE,OAAOZ,EAAE,cAAcY,CAAS,IAAI,EAAE,IAAI,UAAU;AAAA,gBACpD,OAAOA;AAAA,cAAA,EACP;AAAA,cACF,OAAOZ,EAAE,YAAY;AAAA,cACrB,aAAaA,EAAE,kBAAkB;AAAA,cACjC,cAAcA,EAAE,mBAAmB;AAAA,cACnC,YAAU;AAAA,YAAA;AAAA,UAAA;AAAA,UAEZ,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,UAAU;AAAA,cACnB,cAAcA,EAAE,iBAAiB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEnC,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,kBAAkB;AAAA,cAC3B,cAAcA,EAAE,mBAAmB;AAAA,cACnC,WAAAE;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAM;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOb,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,qBAAqB;AAAA,YAC9B,aAAaA,EAAE,2BAA2B;AAAA,UAAA;AAAA,UAE5C;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,oBAAoB;AAAA,YAC7B,aAAaA,EAAE,0BAA0B;AAAA,UAAA;AAAA,QAC3C;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -10,24 +10,20 @@ import { Actions as I } from "./Actions.js";
10
10
  import { LocationsFormProvider as M } from "./useLocationForm.js";
11
11
  import { Form as _ } from "../../../Common/Form/Form.js";
12
12
  import { Flex as w } from "../../../Common/Flex/Flex.js";
13
- import "classnames";
14
- import { componentEvents as a } from "../../../../shared/constants.js";
15
- import "react-i18next";
16
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
17
- import "react";
18
13
  import { BaseComponent as z } from "../../../Base/Base.js";
19
14
  import { useBase as U } from "../../../Base/useBase.js";
20
15
  import { useI18n as j } from "../../../../i18n/I18n.js";
16
+ import { componentEvents as a } from "../../../../shared/constants.js";
21
17
  function H(t) {
22
18
  const {
23
19
  data: { location: e }
24
20
  } = R({ locationId: t.locationId });
25
- return /* @__PURE__ */ o(u, { ...t, location: e });
21
+ return /* @__PURE__ */ o(p, { ...t, location: e });
26
22
  }
27
- function u({
23
+ function p({
28
24
  companyId: t,
29
25
  location: e,
30
- className: i,
26
+ className: n,
31
27
  children: r
32
28
  }) {
33
29
  j("Company.Locations");
@@ -40,13 +36,13 @@ function u({
40
36
  street2: e?.street2 ?? "",
41
37
  state: e?.state ?? "",
42
38
  zip: e?.zip ?? "",
43
- addressType: g.filter((n) => e?.[n] ?? !1)
39
+ addressType: g.filter((i) => e?.[i] ?? !1)
44
40
  }
45
41
  }), v = () => {
46
42
  s(a.CANCEL);
47
- }, C = async (n) => {
48
- await f(n, async (F) => {
49
- const { addressType: c, ...P } = F, p = {
43
+ }, C = async (i) => {
44
+ await f(i, async (F) => {
45
+ const { addressType: c, ...P } = F, u = {
50
46
  ...P,
51
47
  mailingAddress: c?.includes("mailingAddress"),
52
48
  filingAddress: c?.includes("filingAddress")
@@ -55,7 +51,7 @@ function u({
55
51
  const { location: m } = await y({
56
52
  request: {
57
53
  locationId: e.uuid,
58
- requestBody: { ...p, version: e.version }
54
+ requestBody: { ...u, version: e.version }
59
55
  }
60
56
  });
61
57
  s(a.COMPANY_LOCATION_UPDATED, m);
@@ -63,14 +59,14 @@ function u({
63
59
  const { location: m } = await l({
64
60
  request: {
65
61
  companyId: t,
66
- companyLocationRequest: p
62
+ companyLocationRequest: u
67
63
  }
68
64
  });
69
65
  s(a.COMPANY_LOCATION_CREATED, m);
70
66
  }
71
67
  });
72
68
  };
73
- return /* @__PURE__ */ o("section", { className: i, children: /* @__PURE__ */ o(E, { ...d, control: h, children: /* @__PURE__ */ o(_, { onSubmit: d.handleSubmit(C), children: /* @__PURE__ */ o(
69
+ return /* @__PURE__ */ o("section", { className: n, children: /* @__PURE__ */ o(E, { ...d, control: h, children: /* @__PURE__ */ o(_, { onSubmit: d.handleSubmit(C), children: /* @__PURE__ */ o(
74
70
  M,
75
71
  {
76
72
  value: { handleCancel: v, isPending: A || L },
@@ -82,16 +78,16 @@ function u({
82
78
  }
83
79
  ) }) }) });
84
80
  }
85
- function de({
81
+ function ne({
86
82
  companyId: t,
87
83
  locationId: e,
88
- className: i,
84
+ className: n,
89
85
  children: r,
90
86
  ...s
91
87
  }) {
92
- return /* @__PURE__ */ o(z, { ...s, children: e ? /* @__PURE__ */ o(H, { companyId: t, locationId: e, className: i, children: r }) : /* @__PURE__ */ o(u, { companyId: t, className: i, children: r }) });
88
+ return /* @__PURE__ */ o(z, { ...s, children: e ? /* @__PURE__ */ o(H, { companyId: t, locationId: e, className: n, children: r }) : /* @__PURE__ */ o(p, { companyId: t, className: n, children: r }) });
93
89
  }
94
90
  export {
95
- de as LocationForm
91
+ ne as LocationForm
96
92
  };
97
93
  //# sourceMappingURL=LocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/LocationForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useLocationsUpdateMutation } from '@gusto/embedded-api/react-query/locationsUpdate'\nimport { useLocationsRetrieveSuspense } from '@gusto/embedded-api/react-query/locationsRetrieve'\nimport { useLocationsCreateMutation } from '@gusto/embedded-api/react-query/locationsCreate'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { Head } from './Head'\nimport type { LocationFormInputs } from './Form'\nimport { Form, LocationFormSchema } from './Form'\nimport { Actions } from './Actions'\nimport { LocationsFormProvider } from './useLocationForm'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport type { WithRequired } from '@/types/Helpers'\n\ninterface LocationFormProps extends CommonComponentInterface {\n companyId: string\n locationId?: string\n}\n\n/**Accounting for conditional logic where location data needs to be fetched only if locationId is present */\nfunction RootWithLocation(props: WithRequired<LocationFormProps, 'locationId'>) {\n const {\n data: { location },\n } = useLocationsRetrieveSuspense({ locationId: props.locationId })\n return <Root {...props} location={location} />\n}\n\nfunction Root({\n companyId,\n location,\n className,\n children,\n}: LocationFormProps & { location?: Location }) {\n useI18n('Company.Locations')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createLocation, isPending: isPendingCreate } = useLocationsCreateMutation()\n const { mutateAsync: updateLocation, isPending: isPendingUpdate } = useLocationsUpdateMutation()\n const addressType = ['mailingAddress', 'filingAddress'] as const\n\n const { control, ...methods } = useForm<LocationFormInputs>({\n resolver: zodResolver(LocationFormSchema),\n defaultValues: {\n city: location?.city ?? '',\n phoneNumber: location?.phoneNumber ?? '',\n street1: location?.street1 ?? '',\n street2: location?.street2 ?? '',\n state: location?.state ?? '',\n zip: location?.zip ?? '',\n addressType: addressType.filter(key => location?.[key] ?? false),\n },\n })\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n const onSubmit = async (data: LocationFormInputs) => {\n await baseSubmitHandler(data, async innerData => {\n const { addressType, ...payload } = innerData\n\n const requestBody = {\n ...payload,\n mailingAddress: addressType?.includes('mailingAddress'),\n filingAddress: addressType?.includes('filingAddress'),\n }\n\n if (location && location.version !== undefined) {\n const { location: responseData } = await updateLocation({\n request: {\n locationId: location.uuid,\n requestBody: { ...requestBody, version: location.version },\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_UPDATED, responseData)\n } else {\n const { location: responseData } = await createLocation({\n request: {\n companyId,\n companyLocationRequest: requestBody,\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_CREATED, responseData)\n }\n })\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <LocationsFormProvider\n value={{ handleCancel, isPending: isPendingCreate || isPendingUpdate }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n\nexport function LocationForm({\n companyId,\n locationId,\n className,\n children,\n ...props\n}: LocationFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n {locationId ? (\n <RootWithLocation companyId={companyId} locationId={locationId} className={className}>\n {children}\n </RootWithLocation>\n ) : (\n <Root companyId={companyId} className={className}>\n {children}\n </Root>\n )}\n </BaseComponent>\n )\n}\n"],"names":["RootWithLocation","props","location","useLocationsRetrieveSuspense","jsx","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","createLocation","isPendingCreate","useLocationsCreateMutation","updateLocation","isPendingUpdate","useLocationsUpdateMutation","addressType","control","methods","useForm","zodResolver","LocationFormSchema","key","handleCancel","componentEvents","onSubmit","data","innerData","payload","requestBody","responseData","FormProvider","HtmlForm","LocationsFormProvider","Flex","jsxs","Fragment","Head","Form","Actions","LocationForm","locationId","BaseComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,SAASA,EAAiBC,GAAsD;AAC9E,QAAM;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAA6B,EAAE,YAAYF,EAAM,YAAY;AACjE,SAAO,gBAAAG,EAACC,GAAA,EAAM,GAAGJ,GAAO,UAAAC,EAAA,CAAoB;AAC9C;AAEA,SAASG,EAAK;AAAA,EACZ,WAAAC;AAAA,EACA,UAAAJ;AAAA,EACA,WAAAK;AAAA,EACA,UAAAC;AACF,GAAgD;AAC9C,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAAoBC,EAAA,GAC9D,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAAoBC,EAAA,GAC9DC,IAAc,CAAC,kBAAkB,eAAe,GAEhD,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAA4B;AAAA,IAC1D,UAAUC,EAAYC,CAAkB;AAAA,IACxC,eAAe;AAAA,MACb,MAAMtB,GAAU,QAAQ;AAAA,MACxB,aAAaA,GAAU,eAAe;AAAA,MACtC,SAASA,GAAU,WAAW;AAAA,MAC9B,SAASA,GAAU,WAAW;AAAA,MAC9B,OAAOA,GAAU,SAAS;AAAA,MAC1B,KAAKA,GAAU,OAAO;AAAA,MACtB,aAAaiB,EAAY,OAAO,OAAOjB,IAAWuB,CAAG,KAAK,EAAK;AAAA,IAAA;AAAA,EACjE,CACD,GAEKC,IAAe,MAAM;AACzB,IAAAhB,EAAQiB,EAAgB,MAAM;AAAA,EAChC,GACMC,IAAW,OAAOC,MAA6B;AACnD,UAAMlB,EAAkBkB,GAAM,OAAMC,MAAa;AAC/C,YAAM,EAAE,aAAAX,GAAa,GAAGY,MAAYD,GAE9BE,IAAc;AAAA,QAClB,GAAGD;AAAA,QACH,gBAAgBZ,GAAa,SAAS,gBAAgB;AAAA,QACtD,eAAeA,GAAa,SAAS,eAAe;AAAA,MAAA;AAGtD,UAAIjB,KAAYA,EAAS,YAAY,QAAW;AAC9C,cAAM,EAAE,UAAU+B,EAAA,IAAiB,MAAMjB,EAAe;AAAA,UACtD,SAAS;AAAA,YACP,YAAYd,EAAS;AAAA,YACrB,aAAa,EAAE,GAAG8B,GAAa,SAAS9B,EAAS,QAAA;AAAA,UAAQ;AAAA,QAC3D,CACD;AACD,QAAAQ,EAAQiB,EAAgB,0BAA0BM,CAAY;AAAA,MAChE,OAAO;AACL,cAAM,EAAE,UAAUA,EAAA,IAAiB,MAAMpB,EAAe;AAAA,UACtD,SAAS;AAAA,YACP,WAAAP;AAAA,YACA,wBAAwB0B;AAAA,UAAA;AAAA,QAC1B,CACD;AACD,QAAAtB,EAAQiB,EAAgB,0BAA0BM,CAAY;AAAA,MAChE;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SACE,gBAAA7B,EAAC,WAAA,EAAQ,WAAAG,GACP,UAAA,gBAAAH,EAAC8B,KAAc,GAAGb,GAAS,SAAAD,GACzB,UAAA,gBAAAhB,EAAC+B,GAAA,EAAS,UAAUd,EAAQ,aAAaO,CAAQ,GAC/C,UAAA,gBAAAxB;AAAA,IAACgC;AAAA,IAAA;AAAA,MACC,OAAO,EAAE,cAAAV,GAAc,WAAWZ,KAAmBG,EAAA;AAAA,MAErD,UAAA,gBAAAb,EAACiC,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA7B,KAGC,gBAAA8B,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAnC,EAACoC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;AAEO,SAASC,GAAa;AAAA,EAC3B,WAAArC;AAAA,EACA,YAAAsC;AAAA,EACA,WAAArC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGP;AACL,GAA+C;AAC7C,2BACG4C,GAAA,EAAe,GAAG5C,GAChB,UAAA2C,sBACE5C,GAAA,EAAiB,WAAAM,GAAsB,YAAAsC,GAAwB,WAAArC,GAC7D,UAAAC,GACH,IAEA,gBAAAJ,EAACC,KAAK,WAAAC,GAAsB,WAAAC,GACzB,UAAAC,GACH,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"LocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/LocationForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useLocationsUpdateMutation } from '@gusto/embedded-api/react-query/locationsUpdate'\nimport { useLocationsRetrieveSuspense } from '@gusto/embedded-api/react-query/locationsRetrieve'\nimport { useLocationsCreateMutation } from '@gusto/embedded-api/react-query/locationsCreate'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { Head } from './Head'\nimport type { LocationFormInputs } from './Form'\nimport { Form, LocationFormSchema } from './Form'\nimport { Actions } from './Actions'\nimport { LocationsFormProvider } from './useLocationForm'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport type { WithRequired } from '@/types/Helpers'\n\ninterface LocationFormProps extends CommonComponentInterface {\n companyId: string\n locationId?: string\n}\n\n/**Accounting for conditional logic where location data needs to be fetched only if locationId is present */\nfunction RootWithLocation(props: WithRequired<LocationFormProps, 'locationId'>) {\n const {\n data: { location },\n } = useLocationsRetrieveSuspense({ locationId: props.locationId })\n return <Root {...props} location={location} />\n}\n\nfunction Root({\n companyId,\n location,\n className,\n children,\n}: LocationFormProps & { location?: Location }) {\n useI18n('Company.Locations')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createLocation, isPending: isPendingCreate } = useLocationsCreateMutation()\n const { mutateAsync: updateLocation, isPending: isPendingUpdate } = useLocationsUpdateMutation()\n const addressType = ['mailingAddress', 'filingAddress'] as const\n\n const { control, ...methods } = useForm<LocationFormInputs>({\n resolver: zodResolver(LocationFormSchema),\n defaultValues: {\n city: location?.city ?? '',\n phoneNumber: location?.phoneNumber ?? '',\n street1: location?.street1 ?? '',\n street2: location?.street2 ?? '',\n state: location?.state ?? '',\n zip: location?.zip ?? '',\n addressType: addressType.filter(key => location?.[key] ?? false),\n },\n })\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n const onSubmit = async (data: LocationFormInputs) => {\n await baseSubmitHandler(data, async innerData => {\n const { addressType, ...payload } = innerData\n\n const requestBody = {\n ...payload,\n mailingAddress: addressType?.includes('mailingAddress'),\n filingAddress: addressType?.includes('filingAddress'),\n }\n\n if (location && location.version !== undefined) {\n const { location: responseData } = await updateLocation({\n request: {\n locationId: location.uuid,\n requestBody: { ...requestBody, version: location.version },\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_UPDATED, responseData)\n } else {\n const { location: responseData } = await createLocation({\n request: {\n companyId,\n companyLocationRequest: requestBody,\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_CREATED, responseData)\n }\n })\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <LocationsFormProvider\n value={{ handleCancel, isPending: isPendingCreate || isPendingUpdate }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n\nexport function LocationForm({\n companyId,\n locationId,\n className,\n children,\n ...props\n}: LocationFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n {locationId ? (\n <RootWithLocation companyId={companyId} locationId={locationId} className={className}>\n {children}\n </RootWithLocation>\n ) : (\n <Root companyId={companyId} className={className}>\n {children}\n </Root>\n )}\n </BaseComponent>\n )\n}\n"],"names":["RootWithLocation","props","location","useLocationsRetrieveSuspense","jsx","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","createLocation","isPendingCreate","useLocationsCreateMutation","updateLocation","isPendingUpdate","useLocationsUpdateMutation","addressType","control","methods","useForm","zodResolver","LocationFormSchema","key","handleCancel","componentEvents","onSubmit","data","innerData","payload","requestBody","responseData","FormProvider","HtmlForm","LocationsFormProvider","Flex","jsxs","Fragment","Head","Form","Actions","LocationForm","locationId","BaseComponent"],"mappings":";;;;;;;;;;;;;;;;AAyBA,SAASA,EAAiBC,GAAsD;AAC9E,QAAM;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAA6B,EAAE,YAAYF,EAAM,YAAY;AACjE,SAAO,gBAAAG,EAACC,GAAA,EAAM,GAAGJ,GAAO,UAAAC,EAAA,CAAoB;AAC9C;AAEA,SAASG,EAAK;AAAA,EACZ,WAAAC;AAAA,EACA,UAAAJ;AAAA,EACA,WAAAK;AAAA,EACA,UAAAC;AACF,GAAgD;AAC9C,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAAoBC,EAAA,GAC9D,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAAoBC,EAAA,GAC9DC,IAAc,CAAC,kBAAkB,eAAe,GAEhD,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAA4B;AAAA,IAC1D,UAAUC,EAAYC,CAAkB;AAAA,IACxC,eAAe;AAAA,MACb,MAAMtB,GAAU,QAAQ;AAAA,MACxB,aAAaA,GAAU,eAAe;AAAA,MACtC,SAASA,GAAU,WAAW;AAAA,MAC9B,SAASA,GAAU,WAAW;AAAA,MAC9B,OAAOA,GAAU,SAAS;AAAA,MAC1B,KAAKA,GAAU,OAAO;AAAA,MACtB,aAAaiB,EAAY,OAAO,OAAOjB,IAAWuB,CAAG,KAAK,EAAK;AAAA,IAAA;AAAA,EACjE,CACD,GAEKC,IAAe,MAAM;AACzB,IAAAhB,EAAQiB,EAAgB,MAAM;AAAA,EAChC,GACMC,IAAW,OAAOC,MAA6B;AACnD,UAAMlB,EAAkBkB,GAAM,OAAMC,MAAa;AAC/C,YAAM,EAAE,aAAAX,GAAa,GAAGY,MAAYD,GAE9BE,IAAc;AAAA,QAClB,GAAGD;AAAA,QACH,gBAAgBZ,GAAa,SAAS,gBAAgB;AAAA,QACtD,eAAeA,GAAa,SAAS,eAAe;AAAA,MAAA;AAGtD,UAAIjB,KAAYA,EAAS,YAAY,QAAW;AAC9C,cAAM,EAAE,UAAU+B,EAAA,IAAiB,MAAMjB,EAAe;AAAA,UACtD,SAAS;AAAA,YACP,YAAYd,EAAS;AAAA,YACrB,aAAa,EAAE,GAAG8B,GAAa,SAAS9B,EAAS,QAAA;AAAA,UAAQ;AAAA,QAC3D,CACD;AACD,QAAAQ,EAAQiB,EAAgB,0BAA0BM,CAAY;AAAA,MAChE,OAAO;AACL,cAAM,EAAE,UAAUA,EAAA,IAAiB,MAAMpB,EAAe;AAAA,UACtD,SAAS;AAAA,YACP,WAAAP;AAAA,YACA,wBAAwB0B;AAAA,UAAA;AAAA,QAC1B,CACD;AACD,QAAAtB,EAAQiB,EAAgB,0BAA0BM,CAAY;AAAA,MAChE;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SACE,gBAAA7B,EAAC,WAAA,EAAQ,WAAAG,GACP,UAAA,gBAAAH,EAAC8B,KAAc,GAAGb,GAAS,SAAAD,GACzB,UAAA,gBAAAhB,EAAC+B,GAAA,EAAS,UAAUd,EAAQ,aAAaO,CAAQ,GAC/C,UAAA,gBAAAxB;AAAA,IAACgC;AAAA,IAAA;AAAA,MACC,OAAO,EAAE,cAAAV,GAAc,WAAWZ,KAAmBG,EAAA;AAAA,MAErD,UAAA,gBAAAb,EAACiC,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA7B,KAGC,gBAAA8B,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAnC,EAACoC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;AAEO,SAASC,GAAa;AAAA,EAC3B,WAAArC;AAAA,EACA,YAAAsC;AAAA,EACA,WAAArC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGP;AACL,GAA+C;AAC7C,2BACG4C,GAAA,EAAe,GAAG5C,GAChB,UAAA2C,sBACE5C,GAAA,EAAiB,WAAAM,GAAsB,YAAAsC,GAAwB,WAAArC,GAC7D,UAAAC,GACH,IAEA,gBAAAJ,EAACC,KAAK,WAAAC,GAAsB,WAAAC,GACzB,UAAAC,GACH,GAEJ;AAEJ;"}
@@ -2,16 +2,16 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
- import "@gusto/embedded-api/models/errors/gustoembeddederror";
6
- import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
5
  import "@tanstack/react-query";
8
6
  import "../../../Base/useBase.js";
7
+ import "@gusto/embedded-api/models/errors/apierror";
8
+ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
+ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
11
+ import "@gusto/embedded-api/models/errors/httpclienterrors";
9
12
  import "../../../../shared/constants.js";
10
- import "classnames";
11
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
14
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
- import "dompurify";
14
- import "../../../../contexts/LocaleProvider/useLocale.js";
15
15
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
16
  const [L, f] = o(
17
17
  "CompanyDocumentFormContext"
@@ -1,19 +1,16 @@
1
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as s } from "react-i18next";
3
3
  import { useLocationsList as a } from "./useLocationsList.js";
4
- import "../../../../shared/constants.js";
5
- import "classnames";
6
4
  import { ActionsLayout as e } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
5
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import "react";
9
- function x() {
10
- const { t: o } = s("Company.Locations"), { handleAddLocation: i, handleContinue: r } = a(), t = m();
6
+ function f() {
7
+ const { t: o } = s("Company.Locations"), { handleAddLocation: i, handleContinue: r } = a(), n = m();
11
8
  return /* @__PURE__ */ c(e, { children: [
12
- /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("addLocationCta") }),
13
- /* @__PURE__ */ n(t.Button, { onClick: r, children: o("continueCta") })
9
+ /* @__PURE__ */ t(n.Button, { variant: "secondary", onClick: i, children: o("addLocationCta") }),
10
+ /* @__PURE__ */ t(n.Button, { onClick: r, children: o("continueCta") })
14
11
  ] });
15
12
  }
16
13
  export {
17
- x as Actions
14
+ f as Actions
18
15
  };
19
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAA,IAAmBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,gBAAgB,EAAA,CACrB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAA,IAAmBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,gBAAgB,EAAA,CACrB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
@@ -2,26 +2,24 @@ import { jsx as t, Fragment as r, jsxs as n } from "react/jsx-runtime";
2
2
  import { useTranslation as P } from "react-i18next";
3
3
  import { useLocationsList as y } from "./useLocationsList.js";
4
4
  import b from "../../../../assets/icons/pencil.svg.js";
5
- import "../../../../shared/constants.js";
6
- import "classnames";
7
5
  import { EmptyData as x } from "../../../Common/EmptyData/EmptyData.js";
8
- import { HamburgerMenu as T } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
9
- import { useComponentContext as v } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import { getStreet as A, getCityStateZip as k } from "../../../../helpers/formattedStrings.js";
11
- import { VisuallyHidden as D } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
6
+ import { useComponentContext as T } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import { getStreet as v, getCityStateZip as A } from "../../../../helpers/formattedStrings.js";
8
+ import { VisuallyHidden as k } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
9
+ import { HamburgerMenu as D } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
12
10
  import { useDataView as S } from "../../../Common/DataView/useDataView.js";
13
11
  import { DataView as V } from "../../../Common/DataView/DataView.js";
14
- const J = () => {
15
- const a = v(), {
12
+ const q = () => {
13
+ const a = T(), {
16
14
  locationList: o,
17
15
  handleEditLocation: s,
18
16
  currentPage: d,
19
17
  totalPages: l,
20
18
  totalCount: m,
21
19
  handleFirstPage: c,
22
- handleItemsPerPageChange: p,
23
- handleLastPage: g,
24
- handleNextPage: u,
20
+ handleItemsPerPageChange: g,
21
+ handleLastPage: u,
22
+ handleNextPage: p,
25
23
  handlePreviousPage: h,
26
24
  handleAddLocation: f,
27
25
  itemsPerPage: L
@@ -32,13 +30,13 @@ const J = () => {
32
30
  key: "name",
33
31
  title: e("locationListCol1"),
34
32
  render: (i) => /* @__PURE__ */ t(r, { children: /* @__PURE__ */ n("address", { children: [
35
- /* @__PURE__ */ t(a.Text, { as: "div", children: A(i) }),
36
- /* @__PURE__ */ t(a.Text, { as: "div", size: "sm", children: k(i) })
33
+ /* @__PURE__ */ t(a.Text, { as: "div", children: v(i) }),
34
+ /* @__PURE__ */ t(a.Text, { as: "div", size: "sm", children: A(i) })
37
35
  ] }) })
38
36
  },
39
37
  {
40
38
  key: "status",
41
- title: /* @__PURE__ */ t(D, { children: e("locationListCol2") }),
39
+ title: /* @__PURE__ */ t(k, { children: e("locationListCol2") }),
42
40
  render: (i) => /* @__PURE__ */ n(r, { children: [
43
41
  i.mailingAddress && /* @__PURE__ */ t(a.Badge, { status: "info", children: e("mailingAddress") }),
44
42
  i.filingAddress && /* @__PURE__ */ n(r, { children: [
@@ -49,7 +47,7 @@ const J = () => {
49
47
  }
50
48
  ],
51
49
  itemMenu: (i) => /* @__PURE__ */ t(
52
- T,
50
+ D,
53
51
  {
54
52
  items: [
55
53
  {
@@ -66,11 +64,11 @@ const J = () => {
66
64
  }
67
65
  ),
68
66
  pagination: {
69
- handleNextPage: u,
67
+ handleNextPage: p,
70
68
  handleFirstPage: c,
71
- handleLastPage: g,
69
+ handleLastPage: u,
72
70
  handlePreviousPage: h,
73
- handleItemsPerPageChange: p,
71
+ handleItemsPerPageChange: g,
74
72
  currentPage: d,
75
73
  totalPages: l,
76
74
  totalCount: m,
@@ -81,6 +79,6 @@ const J = () => {
81
79
  return /* @__PURE__ */ t(V, { label: e("locationListLabel"), ...C });
82
80
  };
83
81
  export {
84
- J as List
82
+ q as List
85
83
  };
86
84
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n totalCount,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n itemsPerPage,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"div\">{getStreet(location)}</Components.Text>\n <Components.Text as=\"div\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n totalCount,\n itemsPerPage,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","totalCount","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","itemsPerPage","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,IACEC,EAAA,GAEE,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMhB;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOa,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAI,MAEJ,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WAAA,EACC,UAAA;AAAA,UAAA,gBAAAD,EAACpB,EAAW,MAAX,EAAgB,IAAG,OAAO,UAAAsB,EAAUH,CAAQ,GAAE;AAAA,UAC/C,gBAAAC,EAACpB,EAAW,MAAX,EAAgB,IAAG,OAAM,MAAK,MAC5B,UAAAuB,EAAgBJ,CAAQ,EAAA,CAC3B;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,MAEJ;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAAT,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAAI,MAEJ,gBAAAM,EAAAJ,GAAA,EACG,UAAA;AAAA,UAAAF,EAAS,oCACPnB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAe,EAAE,gBAAgB,EAAA,CAAE;AAAA,UAExDI,EAAS,iBACR,gBAAAM,EAAAJ,GAAA,EACG,UAAA;AAAA,YAAA;AAAA,YACD,gBAAAD,EAACpB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAe,EAAE,eAAe,EAAA,CAAE;AAAA,UAAA,EAAA,CACxD;AAAA,QAAA,GAEJ;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAI,MAEN,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAZ,EAAmBgB,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAL;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAO;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAO,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAACpB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASY,GAC7C,UAAAG,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n totalCount,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n itemsPerPage,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"div\">{getStreet(location)}</Components.Text>\n <Components.Text as=\"div\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n totalCount,\n itemsPerPage,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","totalCount","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","itemsPerPage","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,IACEC,EAAA,GAEE,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMhB;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOa,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAI,MAEJ,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WAAA,EACC,UAAA;AAAA,UAAA,gBAAAD,EAACpB,EAAW,MAAX,EAAgB,IAAG,OAAO,UAAAsB,EAAUH,CAAQ,GAAE;AAAA,UAC/C,gBAAAC,EAACpB,EAAW,MAAX,EAAgB,IAAG,OAAM,MAAK,MAC5B,UAAAuB,EAAgBJ,CAAQ,EAAA,CAC3B;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,MAEJ;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAAT,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAAI,MAEJ,gBAAAM,EAAAJ,GAAA,EACG,UAAA;AAAA,UAAAF,EAAS,oCACPnB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAe,EAAE,gBAAgB,EAAA,CAAE;AAAA,UAExDI,EAAS,iBACR,gBAAAM,EAAAJ,GAAA,EACG,UAAA;AAAA,YAAA;AAAA,YACD,gBAAAD,EAACpB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAe,EAAE,eAAe,EAAA,CAAE;AAAA,UAAA,EAAA,CACxD;AAAA,QAAA,GAEJ;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAI,MAEN,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAZ,EAAmBgB,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAL;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAO;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAO,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAACpB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASY,GAC7C,UAAAG,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
@@ -8,19 +8,15 @@ import { useI18n as E } from "../../../../i18n/I18n.js";
8
8
  import { BaseComponent as N } from "../../../Base/Base.js";
9
9
  import { useBase as P } from "../../../Base/useBase.js";
10
10
  import { Flex as _ } from "../../../Common/Flex/Flex.js";
11
- import "classnames";
12
11
  import { companyEvents as i } from "../../../../shared/constants.js";
13
- import "react-i18next";
14
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
- import "react";
16
12
  import { usePagination as g } from "../../../../hooks/usePagination/usePagination.js";
17
- function q(t) {
13
+ function H(t) {
18
14
  return /* @__PURE__ */ o(N, { ...t, children: /* @__PURE__ */ o(x, { ...t, children: t.children }) });
19
15
  }
20
16
  function x({ companyId: t, className: e, children: r }) {
21
17
  E("Company.Locations");
22
- const { onEvent: n } = P(), { getPaginationProps: m } = g(), {
23
- data: { companyLocationsList: s, httpMeta: a }
18
+ const { onEvent: n } = P(), { getPaginationProps: s } = g(), {
19
+ data: { companyLocationsList: m, httpMeta: a }
24
20
  } = u({ companyId: t }), c = () => {
25
21
  n(i.COMPANY_LOCATION_DONE);
26
22
  }, p = () => {
@@ -32,8 +28,8 @@ function x({ companyId: t, className: e, children: r }) {
32
28
  A,
33
29
  {
34
30
  value: {
35
- ...m(a.response.headers),
36
- locationList: s ?? [],
31
+ ...s(a.response.headers),
32
+ locationList: m ?? [],
37
33
  handleAddLocation: p,
38
34
  handleEditLocation: d,
39
35
  handleContinue: c
@@ -47,6 +43,6 @@ function x({ companyId: t, className: e, children: r }) {
47
43
  ) });
48
44
  }
49
45
  export {
50
- q as LocationsList
46
+ H as LocationsList
51
47
  };
52
48
  //# sourceMappingURL=LocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/LocationsList.tsx"],"sourcesContent":["import { useLocationsGetSuspense } from '@gusto/embedded-api/react-query/locationsGet'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { LocationsListProvider } from './useLocationsList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\ninterface LocationsListProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport function LocationsList(props: LocationsListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, className, children }: LocationsListProps) {\n useI18n('Company.Locations')\n const { onEvent } = useBase()\n\n const { getPaginationProps } = usePagination()\n\n const {\n data: { companyLocationsList, httpMeta },\n } = useLocationsGetSuspense({ companyId })\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_LOCATION_DONE)\n }\n const handleAddLocation = () => {\n onEvent(companyEvents.COMPANY_LOCATION_CREATE)\n }\n const handleEditLocation = (uuid: string) => {\n onEvent(companyEvents.COMPANY_LOCATION_EDIT, { uuid })\n }\n\n return (\n <section className={className}>\n <LocationsListProvider\n value={{\n ...getPaginationProps(httpMeta.response.headers),\n locationList: companyLocationsList ?? [],\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsListProvider>\n </section>\n )\n}\n"],"names":["LocationsList","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","useBase","getPaginationProps","usePagination","companyLocationsList","httpMeta","useLocationsGetSuspense","handleContinue","companyEvents","handleAddLocation","handleEditLocation","uuid","LocationsListProvider","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;;;;;AAgBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAgC;AACpE,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,oBAAAC,EAAA,IAAuBC,EAAA,GAEzB;AAAA,IACJ,MAAM,EAAE,sBAAAC,GAAsB,UAAAC,EAAA;AAAA,EAAS,IACrCC,EAAwB,EAAE,WAAAV,GAAW,GAEnCW,IAAiB,MAAM;AAC3B,IAAAP,EAAQQ,EAAc,qBAAqB;AAAA,EAC7C,GACMC,IAAoB,MAAM;AAC9B,IAAAT,EAAQQ,EAAc,uBAAuB;AAAA,EAC/C,GACME,IAAqB,CAACC,MAAiB;AAC3C,IAAAX,EAAQQ,EAAc,uBAAuB,EAAE,MAAAG,EAAA,CAAM;AAAA,EACvD;AAEA,SACE,gBAAAlB,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,GAAGV,EAAmBG,EAAS,SAAS,OAAO;AAAA,QAC/C,cAAcD,KAAwB,CAAA;AAAA,QACtC,mBAAAK;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAH;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAd,EAACoB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAf,KAGC,gBAAAgB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAtB,EAACuB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"LocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/LocationsList.tsx"],"sourcesContent":["import { useLocationsGetSuspense } from '@gusto/embedded-api/react-query/locationsGet'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { LocationsListProvider } from './useLocationsList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\ninterface LocationsListProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport function LocationsList(props: LocationsListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, className, children }: LocationsListProps) {\n useI18n('Company.Locations')\n const { onEvent } = useBase()\n\n const { getPaginationProps } = usePagination()\n\n const {\n data: { companyLocationsList, httpMeta },\n } = useLocationsGetSuspense({ companyId })\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_LOCATION_DONE)\n }\n const handleAddLocation = () => {\n onEvent(companyEvents.COMPANY_LOCATION_CREATE)\n }\n const handleEditLocation = (uuid: string) => {\n onEvent(companyEvents.COMPANY_LOCATION_EDIT, { uuid })\n }\n\n return (\n <section className={className}>\n <LocationsListProvider\n value={{\n ...getPaginationProps(httpMeta.response.headers),\n locationList: companyLocationsList ?? [],\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsListProvider>\n </section>\n )\n}\n"],"names":["LocationsList","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","useBase","getPaginationProps","usePagination","companyLocationsList","httpMeta","useLocationsGetSuspense","handleContinue","companyEvents","handleAddLocation","handleEditLocation","uuid","LocationsListProvider","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAgBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAgC;AACpE,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,oBAAAC,EAAA,IAAuBC,EAAA,GAEzB;AAAA,IACJ,MAAM,EAAE,sBAAAC,GAAsB,UAAAC,EAAA;AAAA,EAAS,IACrCC,EAAwB,EAAE,WAAAV,GAAW,GAEnCW,IAAiB,MAAM;AAC3B,IAAAP,EAAQQ,EAAc,qBAAqB;AAAA,EAC7C,GACMC,IAAoB,MAAM;AAC9B,IAAAT,EAAQQ,EAAc,uBAAuB;AAAA,EAC/C,GACME,IAAqB,CAACC,MAAiB;AAC3C,IAAAX,EAAQQ,EAAc,uBAAuB,EAAE,MAAAG,EAAA,CAAM;AAAA,EACvD;AAEA,SACE,gBAAAlB,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,GAAGV,EAAmBG,EAAS,SAAS,OAAO;AAAA,QAC/C,cAAcD,KAAwB,CAAA;AAAA,QACtC,mBAAAK;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAH;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAd,EAACoB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAf,KAGC,gBAAAgB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAtB,EAACuB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -2,16 +2,16 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
- import "@gusto/embedded-api/models/errors/gustoembeddederror";
6
- import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
5
  import "@tanstack/react-query";
8
6
  import "../../../Base/useBase.js";
7
+ import "@gusto/embedded-api/models/errors/apierror";
8
+ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
+ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
11
+ import "@gusto/embedded-api/models/errors/httpclienterrors";
9
12
  import "../../../../shared/constants.js";
10
- import "classnames";
11
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
14
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
- import "dompurify";
14
- import "../../../../contexts/LocaleProvider/useLocale.js";
15
15
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
16
  const [f, v] = o(
17
17
  "CompanyDocumentListContext"