@gusto/embedded-react-sdk 0.51.2 → 0.52.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 (296) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/components/Base/Base.d.ts +2 -0
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +1 -1
  5. package/dist/components/Common/OnboardingStatusBadge/index.d.ts +1 -1
  6. package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
  7. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +4 -1
  8. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +1 -1
  9. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
  10. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +1 -1
  11. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
  12. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -2
  13. package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +3 -2
  14. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +1 -1
  15. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
  16. package/dist/components/Common/UI/FormBox/FormBox.d.ts +9 -0
  17. package/dist/components/Common/UI/FormBox/FormBox.js +13 -0
  18. package/dist/components/Common/UI/FormBox/FormBox.js.map +1 -0
  19. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js +14 -0
  20. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js.map +1 -0
  21. package/dist/components/Common/UI/FormBox/FormBoxTypes.d.ts +26 -0
  22. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.d.ts +9 -0
  23. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js +23 -0
  24. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js.map +1 -0
  25. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js +8 -0
  26. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js.map +1 -0
  27. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.d.ts +36 -0
  28. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js +7 -0
  29. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js.map +1 -0
  30. package/dist/components/Common/UI/FormBoxHeader/index.d.ts +1 -0
  31. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -0
  32. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  33. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +3 -3
  34. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
  35. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +2 -2
  36. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +2 -2
  37. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  38. package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -2
  39. package/dist/components/Common/UI/Table/TableTypes.d.ts +4 -4
  40. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  41. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +2 -2
  42. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +1 -2
  43. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -3
  44. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  45. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +1 -1
  46. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -3
  47. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  48. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -5
  49. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  50. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -3
  52. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  53. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -1
  54. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -3
  55. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  56. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +1 -1
  57. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +1 -1
  58. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -8
  59. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  60. package/dist/components/Company/Industry/Context.js +8 -6
  61. package/dist/components/Company/Industry/Context.js.map +1 -1
  62. package/dist/components/Company/Locations/LocationForm/Form.d.ts +1 -1
  63. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -3
  64. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  65. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -3
  66. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  67. package/dist/components/Company/OnboardingOverview/context.js +5 -3
  68. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  69. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +3 -3
  70. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +1 -1
  71. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +10 -1
  72. package/dist/components/Company/StateTaxes/StateTaxes.js +23 -17
  73. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  74. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +2 -0
  75. package/dist/components/Company/StateTaxes/StateTaxesComponents.js +17 -10
  76. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  77. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -3
  78. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  79. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +26 -26
  80. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  81. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +9 -0
  82. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +24 -24
  83. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  84. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -3
  85. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  86. package/dist/components/Contractor/Address/Address.d.ts +4 -3
  87. package/dist/components/Contractor/Address/Address.js.map +1 -1
  88. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +2 -2
  89. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +1 -1
  90. package/dist/components/Contractor/ContractorList/index.d.ts +2 -1
  91. package/dist/components/Contractor/ContractorList/index.js +123 -98
  92. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  93. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +22 -19
  94. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -1
  95. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.d.ts +1 -1
  96. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.d.ts +1 -1
  97. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +1 -1
  98. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +1 -1
  99. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  100. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +2 -0
  101. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  102. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +150 -80
  103. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  104. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.test.d.ts +1 -0
  105. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.d.ts +1 -1
  106. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.d.ts +1 -1
  107. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js.map +1 -1
  108. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.d.ts +2 -2
  109. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  110. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +1 -1
  111. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  112. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +2 -2
  113. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  114. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +17 -5
  115. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +32 -31
  116. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
  117. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +16 -4
  118. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +33 -29
  119. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  120. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +1 -1
  121. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +19 -18
  122. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -1
  123. package/dist/components/Contractor/Profile/ContractorProfile.d.ts +1 -1
  124. package/dist/components/Contractor/Profile/ContractorProfile.js +114 -110
  125. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  126. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +27 -26
  127. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -1
  128. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +1 -1
  129. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +6 -6
  130. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -1
  131. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +1 -1
  132. package/dist/components/Contractor/Submit/Submit.js +106 -63
  133. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  134. package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +0 -4
  135. package/dist/components/Employee/Compensation/onboarding/Compensation.js +38 -42
  136. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
  137. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +2 -2
  138. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +1 -1
  139. package/dist/components/Employee/Dashboard/index.d.ts +1 -1
  140. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +1 -1
  141. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +1 -1
  142. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -2
  143. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -3
  144. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  145. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +2 -2
  146. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +1 -4
  147. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
  148. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -2
  149. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js +27 -32
  150. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
  151. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +1 -2
  152. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
  153. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +2 -2
  154. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +1 -1
  155. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.d.ts +1 -1
  156. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js +1 -3
  157. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
  158. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +55 -49
  159. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  160. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +1 -1
  161. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +1 -1
  162. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
  163. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +1 -1
  164. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +1 -1
  165. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +2 -2
  166. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -1
  167. package/dist/components/Employee/exports/employeeManagement.d.ts +1 -1
  168. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +4 -5
  169. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +101 -125
  170. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  171. package/dist/components/InformationRequests/InformationRequestsComponents.d.ts +0 -5
  172. package/dist/components/InformationRequests/InformationRequestsComponents.js +12 -13
  173. package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -1
  174. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +4 -4
  175. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
  176. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +1 -1
  177. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +8 -8
  178. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  179. package/dist/components/Payroll/OffCycle/index.d.ts +1 -1
  180. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +1 -1
  181. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +97 -92
  182. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  183. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +2 -3
  184. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  185. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -2
  186. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +1 -1
  187. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  188. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +57 -56
  189. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  190. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  191. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +23 -6
  192. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +37 -33
  193. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  194. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +2 -2
  195. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +6 -6
  196. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
  197. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +1 -1
  198. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  199. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -1
  200. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  201. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  202. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -1
  203. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +1 -1
  204. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  205. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -1
  206. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +31 -31
  207. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  208. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +9 -5
  209. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  210. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -1
  211. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +1 -1
  212. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  213. package/dist/components/Payroll/Transition/index.d.ts +1 -1
  214. package/dist/components/Payroll/helpers.d.ts +22 -8
  215. package/dist/components/Payroll/helpers.js +1 -1
  216. package/dist/components/Payroll/helpers.js.map +1 -1
  217. package/dist/components/Payroll/index.d.ts +3 -2
  218. package/dist/components/Payroll/payrollTypes.d.ts +1 -1
  219. package/dist/components/Payroll/payrollTypes.js +1 -1
  220. package/dist/components/Payroll/payrollTypes.js.map +1 -1
  221. package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
  222. package/dist/components/Payroll/usePreparedPayrollData.js +10 -8
  223. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  224. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +1 -1
  225. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +19 -19
  226. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  227. package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -5
  228. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  229. package/dist/contexts/ApiProvider/apiVersion.d.ts +2 -2
  230. package/dist/contexts/ApiProvider/apiVersion.js +1 -1
  231. package/dist/contexts/ApiProvider/apiVersion.js.map +1 -1
  232. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +40 -36
  233. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  234. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
  235. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
  236. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +18 -16
  237. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  238. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +7 -1
  239. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  240. package/dist/contexts/GustoProvider/GustoProvider.d.ts +5 -5
  241. package/dist/contexts/GustoProvider/GustoProvider.js +6 -6
  242. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  243. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +8 -7
  244. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -8
  245. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  246. package/dist/contexts/GustoProvider/index.d.ts +1 -1
  247. package/dist/contexts/ThemeProvider/types.d.ts +2 -2
  248. package/dist/contexts/index.d.ts +2 -6
  249. package/dist/i18n/en/Contractor.ContractorList.json.js +22 -18
  250. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  251. package/dist/i18n/en/Contractor.SignatureForm.json.js +5 -5
  252. package/dist/i18n/en/Contractor.Submit.json.js +11 -11
  253. package/dist/i18n/en/Employee.OnboardingSummary.json.js +24 -20
  254. package/dist/i18n/en/Employee.OnboardingSummary.json.js.map +1 -1
  255. package/dist/i18n/types.d.ts +15 -3
  256. package/dist/index.d.ts +8 -7
  257. package/dist/index.js +121 -134
  258. package/dist/index.js.map +1 -1
  259. package/dist/models/WA_RISK_CODES.d.ts +6 -2
  260. package/dist/models/WA_RISK_CODES.js.map +1 -1
  261. package/dist/models/external.d.ts +67 -57
  262. package/dist/partner-hook-utils/composeErrorHandler.d.ts +13 -4
  263. package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
  264. package/dist/partner-hook-utils/form/SDKFormProvider.d.ts +11 -2
  265. package/dist/partner-hook-utils/form/SDKFormProvider.js +7 -1
  266. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
  267. package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +11 -4
  268. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
  269. package/dist/partner-hook-utils/form/fields/CheckboxHookField.d.ts +1 -0
  270. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  271. package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +1 -0
  272. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  273. package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +1 -0
  274. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  275. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.d.ts +1 -0
  276. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  277. package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +1 -0
  278. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  279. package/dist/partner-hook-utils/form/fields/SwitchHookField.d.ts +1 -0
  280. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  281. package/dist/partner-hook-utils/form/fields/TextInputHookField.d.ts +1 -0
  282. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  283. package/dist/partner-hook-utils/form/fields/index.d.ts +1 -0
  284. package/dist/partner-hook-utils/form/index.d.ts +3 -3
  285. package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
  286. package/dist/partner-hook-utils/index.d.ts +1 -1
  287. package/dist/partner-hook-utils/types.d.ts +16 -3
  288. package/dist/shared/constants.d.ts +12 -2
  289. package/dist/shared/constants.js +11 -10
  290. package/dist/shared/constants.js.map +1 -1
  291. package/dist/style.css +1 -1
  292. package/dist/types/Helpers.d.ts +13 -0
  293. package/dist/types/hooks.d.ts +2 -1
  294. package/dist/types/observability.d.ts +1 -0
  295. package/docs/guides/endpoint-inventory.json +396 -380
  296. package/package.json +17 -17
@@ -7,6 +7,8 @@ export interface StateTaxesContextInterface extends FlowContextInterface {
7
7
  state?: string;
8
8
  /** Current step component rendered by the flow machine. */
9
9
  component: React.ComponentType | null;
10
+ /** Controls visibility of the Continue button in the state tax list. */
11
+ showContinueButton: boolean;
10
12
  }
11
13
  /** @internal */
12
14
  export declare function StateTaxesListContextual(): import("react").JSX.Element;
@@ -1,20 +1,27 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import { StateTaxesList as m } from "./StateTaxesList/StateTaxesList.js";
3
3
  import { StateTaxesForm as s } from "./StateTaxesForm/StateTaxesForm.js";
4
- import { useFlow as r } from "../../Flow/useFlow.js";
5
- import { ensureRequired as e } from "../../../helpers/ensureRequired.js";
4
+ import { useFlow as a } from "../../Flow/useFlow.js";
5
+ import { ensureRequired as n } from "../../../helpers/ensureRequired.js";
6
6
  function f() {
7
- const { companyId: t, onEvent: o } = r();
8
- return /* @__PURE__ */ n(m, { onEvent: o, companyId: e(t) });
7
+ const { companyId: t, onEvent: o, showContinueButton: e } = a();
8
+ return /* @__PURE__ */ r(
9
+ m,
10
+ {
11
+ onEvent: o,
12
+ companyId: n(t),
13
+ showContinueButton: e
14
+ }
15
+ );
9
16
  }
10
17
  function d() {
11
- const { companyId: t, state: o, onEvent: a } = r();
12
- return /* @__PURE__ */ n(
18
+ const { companyId: t, state: o, onEvent: e } = a();
19
+ return /* @__PURE__ */ r(
13
20
  s,
14
21
  {
15
- companyId: e(t),
16
- state: e(o),
17
- onEvent: a
22
+ companyId: n(t),
23
+ state: n(o),
24
+ onEvent: e
18
25
  }
19
26
  );
20
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StateTaxesComponents.js","sources":["../../../../src/components/Company/StateTaxes/StateTaxesComponents.tsx"],"sourcesContent":["import { StateTaxesList } from './StateTaxesList/StateTaxesList'\nimport { StateTaxesForm } from './StateTaxesForm/StateTaxesForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/** @internal */\nexport interface StateTaxesContextInterface extends FlowContextInterface {\n /** UUID of the company whose state taxes are being managed. */\n companyId: string\n /** Two-letter state code currently being edited, when in the form view. */\n state?: string\n /** Current step component rendered by the flow machine. */\n component: React.ComponentType | null\n}\n\n/** @internal */\nexport function StateTaxesListContextual() {\n const { companyId, onEvent } = useFlow<StateTaxesContextInterface>()\n return <StateTaxesList onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\n/** @internal */\nexport function StateTaxesFormContextual() {\n const { companyId, state, onEvent } = useFlow<StateTaxesContextInterface>()\n return (\n <StateTaxesForm\n companyId={ensureRequired(companyId)}\n state={ensureRequired(state)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["StateTaxesListContextual","companyId","onEvent","useFlow","StateTaxesList","ensureRequired","StateTaxesFormContextual","state","jsx","StateTaxesForm"],"mappings":";;;;;AAgBO,SAASA,IAA2B;AACzC,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAe,SAAAF,GAAkB,WAAWG,EAAeJ,CAAS,GAAG;AACjF;AAGO,SAASK,IAA2B;AACzC,QAAM,EAAE,WAAAL,GAAW,OAAAM,GAAO,SAAAL,EAAA,IAAYC,EAAA;AACtC,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWJ,EAAeJ,CAAS;AAAA,MACnC,OAAOI,EAAeE,CAAK;AAAA,MAC3B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"StateTaxesComponents.js","sources":["../../../../src/components/Company/StateTaxes/StateTaxesComponents.tsx"],"sourcesContent":["import { StateTaxesList } from './StateTaxesList/StateTaxesList'\nimport { StateTaxesForm } from './StateTaxesForm/StateTaxesForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/** @internal */\nexport interface StateTaxesContextInterface extends FlowContextInterface {\n /** UUID of the company whose state taxes are being managed. */\n companyId: string\n /** Two-letter state code currently being edited, when in the form view. */\n state?: string\n /** Current step component rendered by the flow machine. */\n component: React.ComponentType | null\n /** Controls visibility of the Continue button in the state tax list. */\n showContinueButton: boolean\n}\n\n/** @internal */\nexport function StateTaxesListContextual() {\n const { companyId, onEvent, showContinueButton } = useFlow<StateTaxesContextInterface>()\n return (\n <StateTaxesList\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n showContinueButton={showContinueButton}\n />\n )\n}\n\n/** @internal */\nexport function StateTaxesFormContextual() {\n const { companyId, state, onEvent } = useFlow<StateTaxesContextInterface>()\n return (\n <StateTaxesForm\n companyId={ensureRequired(companyId)}\n state={ensureRequired(state)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["StateTaxesListContextual","companyId","onEvent","showContinueButton","useFlow","jsx","StateTaxesList","ensureRequired","StateTaxesFormContextual","state","StateTaxesForm"],"mappings":";;;;;AAkBO,SAASA,IAA2B;AACzC,QAAM,EAAE,WAAAC,GAAW,SAAAC,GAAS,oBAAAC,EAAA,IAAuBC,EAAA;AACnD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAJ;AAAA,MACA,WAAWK,EAAeN,CAAS;AAAA,MACnC,oBAAAE;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASK,IAA2B;AACzC,QAAM,EAAE,WAAAP,GAAW,OAAAQ,GAAO,SAAAP,EAAA,IAAYE,EAAA;AACtC,SACE,gBAAAC;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,WAAWH,EAAeN,CAAS;AAAA,MACnC,OAAOM,EAAeE,CAAK;AAAA,MAC3B,SAAAP;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -9,13 +9,15 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
16
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
17
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesFormContext");
18
+ const [f, v] = t("StateTaxesFormContext");
17
19
  export {
18
- u as StateTaxesFormProvider,
19
- d as useStateTaxesForm
20
+ v as StateTaxesFormProvider,
21
+ f as useStateTaxesForm
20
22
  };
21
23
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
@@ -1,18 +1,18 @@
1
1
  import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
- import { useTranslation as p } from "react-i18next";
2
+ import { useTranslation as l } from "react-i18next";
3
3
  import { SetupStatus as t } from "@gusto/embedded-api/models/components/taxrequirementstateslist";
4
- import { useStateTaxesList as f } from "./context.js";
5
- import { Flex as l } from "../../../Common/Flex/Flex.js";
6
- import { EmptyData as g } from "../../../Common/EmptyData/EmptyData.js";
7
- import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
4
+ import { useStateTaxesList as g } from "./context.js";
5
+ import { Flex as p } from "../../../Common/Flex/Flex.js";
6
+ import { EmptyData as f } from "../../../Common/EmptyData/EmptyData.js";
7
+ import { useComponentContext as x } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
8
  import "react";
9
- import { useDataView as x } from "../../../Common/DataView/useDataView.js";
10
- import { DataView as C } from "../../../Common/DataView/DataView.js";
11
- const T = {
9
+ import { useDataView as S } from "../../../Common/DataView/useDataView.js";
10
+ import { DataView as T } from "../../../Common/DataView/DataView.js";
11
+ const y = {
12
12
  [t.NotStarted]: "info",
13
13
  [t.InProgress]: "warning",
14
14
  [t.Complete]: "success"
15
- }, y = {
15
+ }, C = {
16
16
  [t.NotStarted]: "notStartedBadge",
17
17
  [t.InProgress]: "inProgressBadge",
18
18
  [t.Complete]: "completeBadge"
@@ -21,49 +21,49 @@ const T = {
21
21
  [t.InProgress]: "continueStateTaxSetupCta",
22
22
  [t.Complete]: "editStateTaxCta"
23
23
  };
24
- function m(o) {
25
- return o.setupStatus ? o.setupStatus : o.setupComplete ? t.Complete : t.InProgress;
24
+ function m(n) {
25
+ return n.setupStatus ?? t.InProgress;
26
26
  }
27
27
  const N = () => {
28
- const { stateTaxRequirements: o, handleChange: u } = f(), r = S(), { t: e } = p("Company.StateTaxes", { keyPrefix: "list" }), { t: c } = p("common", { keyPrefix: "statesHash" }), { ...d } = x({
29
- data: o,
28
+ const { stateTaxRequirements: n, handleChange: c } = g(), o = x(), { t: e } = l("Company.StateTaxes", { keyPrefix: "list" }), { t: u } = l("common", { keyPrefix: "statesHash" }), { ...d } = S({
29
+ data: n,
30
30
  columns: [
31
31
  {
32
32
  key: "state",
33
33
  title: e("requirementsListCol1"),
34
- render: (a) => /* @__PURE__ */ i(l, { flexDirection: "column", gap: 4, children: [
35
- /* @__PURE__ */ s(r.Text, { as: "span", children: c(a.state) }),
36
- a.defaultRatesApplied && /* @__PURE__ */ s(r.Text, { size: "sm", children: e("defaultRatesAppliedText") })
34
+ render: (a) => /* @__PURE__ */ i(p, { flexDirection: "column", gap: 4, children: [
35
+ /* @__PURE__ */ s(o.Text, { as: "span", children: u(a.state) }),
36
+ a.defaultRatesApplied && /* @__PURE__ */ s(o.Text, { size: "sm", children: e("defaultRatesAppliedText") })
37
37
  ] })
38
38
  },
39
39
  {
40
40
  key: "status",
41
41
  title: e("requirementsListCol2"),
42
42
  render: (a) => {
43
- const n = m(a);
44
- return /* @__PURE__ */ i(l, { gap: 8, alignItems: "center", flexWrap: "wrap", children: [
45
- /* @__PURE__ */ s(r.Badge, { status: T[n], children: e(y[n]) }),
46
- a.readyToRunPayroll && /* @__PURE__ */ s(r.Badge, { status: "success", children: e("readyToRunPayrollBadge") })
43
+ const r = m(a);
44
+ return /* @__PURE__ */ i(p, { gap: 8, alignItems: "center", flexWrap: "wrap", children: [
45
+ /* @__PURE__ */ s(o.Badge, { status: y[r], children: e(C[r]) }),
46
+ a.readyToRunPayroll && /* @__PURE__ */ s(o.Badge, { status: "success", children: e("readyToRunPayrollBadge") })
47
47
  ] });
48
48
  }
49
49
  }
50
50
  ],
51
51
  itemMenu: (a) => {
52
- const n = m(a);
52
+ const r = m(a);
53
53
  return /* @__PURE__ */ s(
54
- r.Button,
54
+ o.Button,
55
55
  {
56
56
  variant: "secondary",
57
57
  onClick: () => {
58
- a.state && u(a.state);
58
+ a.state && c(a.state);
59
59
  },
60
- children: e(h[n])
60
+ children: e(h[r])
61
61
  }
62
62
  );
63
63
  },
64
- emptyState: () => /* @__PURE__ */ s(g, { title: e("emptyTableTitle"), description: e("emptyTableDescription") })
64
+ emptyState: () => /* @__PURE__ */ s(f, { title: e("emptyTableTitle"), description: e("emptyTableDescription") })
65
65
  });
66
- return /* @__PURE__ */ s(C, { label: e("requirementsListLabel"), ...d });
66
+ return /* @__PURE__ */ s(T, { label: e("requirementsListLabel"), ...d });
67
67
  };
68
68
  export {
69
69
  N as List
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport {\n SetupStatus,\n type TaxRequirementStatesList,\n} from '@gusto/embedded-api/models/components/taxrequirementstateslist'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, Flex, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype BadgeStatus = 'success' | 'warning' | 'info'\n\nconst badgeStatusMap: Record<SetupStatus, BadgeStatus> = {\n [SetupStatus.NotStarted]: 'info',\n [SetupStatus.InProgress]: 'warning',\n [SetupStatus.Complete]: 'success',\n}\n\nconst badgeLabelMap = {\n [SetupStatus.NotStarted]: 'notStartedBadge',\n [SetupStatus.InProgress]: 'inProgressBadge',\n [SetupStatus.Complete]: 'completeBadge',\n} as const satisfies Record<SetupStatus, string>\n\nconst ctaLabelMap = {\n [SetupStatus.NotStarted]: 'startStateTaxSetupCta',\n [SetupStatus.InProgress]: 'continueStateTaxSetupCta',\n [SetupStatus.Complete]: 'editStateTaxCta',\n} as const satisfies Record<SetupStatus, string>\n\nfunction getSetupStatus(req: TaxRequirementStatesList): SetupStatus {\n if (req.setupStatus) return req.setupStatus\n return req.setupComplete ? SetupStatus.Complete : SetupStatus.InProgress\n}\n\n/** @internal */\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => (\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Text as=\"span\">\n {statesHash(requirement.state as (typeof STATES_ABBR)[number])}\n </Components.Text>\n {requirement.defaultRatesApplied && (\n <Components.Text size=\"sm\">{t('defaultRatesAppliedText')}</Components.Text>\n )}\n </Flex>\n ),\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n const status = getSetupStatus(requirement)\n return (\n <Flex gap={8} alignItems=\"center\" flexWrap=\"wrap\">\n <Components.Badge status={badgeStatusMap[status]}>\n {t(badgeLabelMap[status])}\n </Components.Badge>\n {requirement.readyToRunPayroll && (\n <Components.Badge status=\"success\">{t('readyToRunPayrollBadge')}</Components.Badge>\n )}\n </Flex>\n )\n },\n },\n ],\n itemMenu: requirement => {\n const status = getSetupStatus(requirement)\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n if (requirement.state) handleChange(requirement.state)\n }}\n >\n {t(ctaLabelMap[status])}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["badgeStatusMap","SetupStatus","badgeLabelMap","ctaLabelMap","getSetupStatus","req","List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","t","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsxs","Flex","jsx","status","EmptyData","DataView"],"mappings":";;;;;;;;;;AAYA,MAAMA,IAAmD;AAAA,EACvD,CAACC,EAAY,UAAU,GAAG;AAAA,EAC1B,CAACA,EAAY,UAAU,GAAG;AAAA,EAC1B,CAACA,EAAY,QAAQ,GAAG;AAC1B,GAEMC,IAAgB;AAAA,EACpB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A,gBAAAC,EAACV,EAAW,OAAX,EAAiB,QAAQV,EAAeqB,CAAM,GAC5C,UAAAT,EAAEV,EAAcmB,CAAM,CAAC,EAAA,CAC1B;AAAA,YACCJ,EAAY,qBACX,gBAAAG,EAACV,EAAW,OAAX,EAAiB,QAAO,WAAW,UAAAE,EAAE,wBAAwB,EAAA,CAAE;AAAA,UAAA,GAEpE;AAAA,QAEJ;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,UAAU,CAAAK,MAAe;AACvB,YAAMI,IAASjB,EAAea,CAAW;AACzC,aACE,gBAAAG;AAAA,QAACV,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAIO,EAAY,SAAOT,EAAaS,EAAY,KAAK;AAAA,UACvD;AAAA,UAEC,UAAAL,EAAET,EAAYkB,CAAM,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IAG5B;AAAA,IAEA,YAAY,MACV,gBAAAD,EAACE,GAAA,EAAU,OAAOV,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQW,GAAA,EAAS,OAAOX,EAAE,uBAAuB,GAAI,GAAGG,GAAe;AACzE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport {\n SetupStatus,\n type TaxRequirementStatesList,\n} from '@gusto/embedded-api/models/components/taxrequirementstateslist'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, Flex, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype BadgeStatus = 'success' | 'warning' | 'info'\n\nconst badgeStatusMap: Record<SetupStatus, BadgeStatus> = {\n [SetupStatus.NotStarted]: 'info',\n [SetupStatus.InProgress]: 'warning',\n [SetupStatus.Complete]: 'success',\n}\n\nconst badgeLabelMap = {\n [SetupStatus.NotStarted]: 'notStartedBadge',\n [SetupStatus.InProgress]: 'inProgressBadge',\n [SetupStatus.Complete]: 'completeBadge',\n} as const satisfies Record<SetupStatus, string>\n\nconst ctaLabelMap = {\n [SetupStatus.NotStarted]: 'startStateTaxSetupCta',\n [SetupStatus.InProgress]: 'continueStateTaxSetupCta',\n [SetupStatus.Complete]: 'editStateTaxCta',\n} as const satisfies Record<SetupStatus, string>\n\nfunction getSetupStatus(req: TaxRequirementStatesList): SetupStatus {\n return req.setupStatus ?? SetupStatus.InProgress\n}\n\n/** @internal */\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => (\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Text as=\"span\">\n {statesHash(requirement.state as (typeof STATES_ABBR)[number])}\n </Components.Text>\n {requirement.defaultRatesApplied && (\n <Components.Text size=\"sm\">{t('defaultRatesAppliedText')}</Components.Text>\n )}\n </Flex>\n ),\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n const status = getSetupStatus(requirement)\n return (\n <Flex gap={8} alignItems=\"center\" flexWrap=\"wrap\">\n <Components.Badge status={badgeStatusMap[status]}>\n {t(badgeLabelMap[status])}\n </Components.Badge>\n {requirement.readyToRunPayroll && (\n <Components.Badge status=\"success\">{t('readyToRunPayrollBadge')}</Components.Badge>\n )}\n </Flex>\n )\n },\n },\n ],\n itemMenu: requirement => {\n const status = getSetupStatus(requirement)\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n if (requirement.state) handleChange(requirement.state)\n }}\n >\n {t(ctaLabelMap[status])}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["badgeStatusMap","SetupStatus","badgeLabelMap","ctaLabelMap","getSetupStatus","req","List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","t","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsxs","Flex","jsx","status","EmptyData","DataView"],"mappings":";;;;;;;;;;AAYA,MAAMA,IAAmD;AAAA,EACvD,CAACC,EAAY,UAAU,GAAG;AAAA,EAC1B,CAACA,EAAY,UAAU,GAAG;AAAA,EAC1B,CAACA,EAAY,QAAQ,GAAG;AAC1B,GAEMC,IAAgB;AAAA,EACpB,CAACD,EAAY,UAAU,GAAG;AAAA,EAC1B,CAACA,EAAY,UAAU,GAAG;AAAA,EAC1B,CAACA,EAAY,QAAQ,GAAG;AAC1B,GAEME,IAAc;AAAA,EAClB,CAACF,EAAY,UAAU,GAAG;AAAA,EAC1B,CAACA,EAAY,UAAU,GAAG;AAAA,EAC1B,CAACA,EAAY,QAAQ,GAAG;AAC1B;AAEA,SAASG,EAAeC,GAA4C;AAClE,SAAOA,EAAI,eAAeJ,EAAY;AACxC;AAGO,MAAMK,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,GAAAC,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMT;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOK,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAK,MACN,gBAAAC,EAACC,KAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,UAAA,gBAAAC,EAACV,EAAW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7
  export interface StateTaxesListProps extends BaseComponentInterface<'Company.StateTaxes'> {
8
8
  /** The associated company identifier. */
9
9
  companyId: string;
10
+ /**
11
+ * Controls visibility of the Continue button below the state tax list.
12
+ *
13
+ * When `false`, hides the Continue button. Use this when the list is embedded
14
+ * as one step inside a larger flow that provides its own navigation.
15
+ *
16
+ * @defaultValue `true`
17
+ */
18
+ showContinueButton?: boolean;
10
19
  }
11
20
  /**
12
21
  * Displays the list of state tax requirements for a company with their setup status.
@@ -1,42 +1,42 @@
1
- import { jsx as e, jsxs as c, Fragment as l } from "react/jsx-runtime";
2
- import { useTaxRequirementsGetAllSuspense as u } from "@gusto/embedded-api/react-query/taxRequirementsGetAll";
3
- import { Head as d } from "./Head.js";
4
- import { StateTaxesListProvider as f } from "./context.js";
5
- import { Actions as p } from "./Actions.js";
6
- import { List as h } from "./List.js";
7
- import { BaseComponent as T } from "../../../Base/Base.js";
8
- import { useI18n as x } from "../../../../i18n/I18n.js";
9
- import { Flex as A } from "../../../Common/Flex/Flex.js";
1
+ import { jsx as e, jsxs as l, Fragment as u } from "react/jsx-runtime";
2
+ import { useTaxRequirementsGetAllSuspense as d } from "@gusto/embedded-api/react-query/taxRequirementsGetAll";
3
+ import { Head as f } from "./Head.js";
4
+ import { StateTaxesListProvider as p } from "./context.js";
5
+ import { Actions as h } from "./Actions.js";
6
+ import { List as T } from "./List.js";
7
+ import { BaseComponent as x } from "../../../Base/Base.js";
8
+ import { useI18n as A } from "../../../../i18n/I18n.js";
9
+ import { Flex as C } from "../../../Common/Flex/Flex.js";
10
10
  import { componentEvents as r } from "../../../../shared/constants.js";
11
- import { useBase as C } from "../../../Base/useBase.js";
12
- function B(t) {
13
- return /* @__PURE__ */ e(T, { ...t, children: /* @__PURE__ */ e(S, { ...t, children: t.children }) });
11
+ import { useBase as S } from "../../../Base/useBase.js";
12
+ function F(t) {
13
+ return /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(E, { ...t, children: t.children }) });
14
14
  }
15
- function S({ className: t, children: n, companyId: i }) {
16
- x("Company.StateTaxes");
17
- const { onEvent: o } = C(), { data: m } = u({ companyUuid: i }), s = m.taxRequirementStatesList;
15
+ function E({ className: t, children: n, companyId: i, showContinueButton: m = !0 }) {
16
+ A("Company.StateTaxes");
17
+ const { onEvent: o } = S(), { data: s } = d({ companyUuid: i }), a = s.taxRequirementStatesList;
18
18
  return /* @__PURE__ */ e("section", { className: t, children: /* @__PURE__ */ e(
19
- f,
19
+ p,
20
20
  {
21
21
  value: {
22
22
  isPending: !1,
23
- stateTaxRequirements: s,
23
+ stateTaxRequirements: a,
24
24
  handleContinue: () => {
25
25
  o(r.COMPANY_STATE_TAX_DONE);
26
26
  },
27
- handleChange: (a) => {
28
- o(r.COMPANY_STATE_TAX_EDIT, { state: a });
27
+ handleChange: (c) => {
28
+ o(r.COMPANY_STATE_TAX_EDIT, { state: c });
29
29
  }
30
30
  },
31
- children: /* @__PURE__ */ e(A, { flexDirection: "column", gap: 32, children: n || /* @__PURE__ */ c(l, { children: [
32
- /* @__PURE__ */ e(d, {}),
33
- /* @__PURE__ */ e(h, {}),
34
- /* @__PURE__ */ e(p, {})
31
+ children: /* @__PURE__ */ e(C, { flexDirection: "column", gap: 32, children: n || /* @__PURE__ */ l(u, { children: [
32
+ /* @__PURE__ */ e(f, {}),
33
+ /* @__PURE__ */ e(T, {}),
34
+ m && /* @__PURE__ */ e(h, {})
35
35
  ] }) })
36
36
  }
37
37
  ) });
38
38
  }
39
39
  export {
40
- B as StateTaxesList
40
+ F as StateTaxesList
41
41
  };
42
42
  //# sourceMappingURL=StateTaxesList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StateTaxesList.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/StateTaxesList.tsx"],"sourcesContent":["import { useTaxRequirementsGetAllSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGetAll'\nimport { Head } from './Head'\nimport { StateTaxesListProvider } from './context'\nimport { Actions } from './Actions'\nimport { List } from './List'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\n/**\n * Props for the {@link StateTaxesList} component.\n *\n * @public\n */\nexport interface StateTaxesListProps extends BaseComponentInterface<'Company.StateTaxes'> {\n /** The associated company identifier. */\n companyId: string\n}\n\n/**\n * Displays the list of state tax requirements for a company with their setup status.\n *\n * @remarks\n * Standalone building block used internally by the orchestrated `StateTaxes` component for its list view. Use this directly when you need full control over navigation between the list and form views.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `company/stateTaxes/edit` | A user chose to edit requirements for a specific state | `{ state: string }` |\n * | `company/stateTaxes/done` | The user chose to proceed to the next step | — |\n *\n * @param props - Component props including the `companyId` whose state tax requirements should be listed.\n * @returns The rendered state taxes list section.\n * @public\n */\nexport function StateTaxesList(props: StateTaxesListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, companyId }: StateTaxesListProps) {\n useI18n('Company.StateTaxes')\n const { onEvent } = useBase()\n const { data } = useTaxRequirementsGetAllSuspense({ companyUuid: companyId })\n const stateTaxRequirements = data.taxRequirementStatesList!\n\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_STATE_TAX_DONE)\n }\n\n const handleChange = (state: string) => {\n onEvent(componentEvents.COMPANY_STATE_TAX_EDIT, { state })\n }\n\n return (\n <section className={className}>\n <StateTaxesListProvider\n value={{\n isPending: false,\n stateTaxRequirements,\n handleContinue,\n handleChange,\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 </StateTaxesListProvider>\n </section>\n )\n}\n"],"names":["StateTaxesList","props","jsx","BaseComponent","Root","className","children","companyId","useI18n","onEvent","useBase","data","useTaxRequirementsGetAllSuspense","stateTaxRequirements","StateTaxesListProvider","componentEvents","state","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;AAsCO,SAASA,EAAeC,GAA4B;AACzD,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,UAAAC,GAAU,WAAAC,KAAkC;AACrE,EAAAC,EAAQ,oBAAoB;AAC5B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACd,EAAE,MAAAC,EAAA,IAASC,EAAiC,EAAE,aAAaL,GAAW,GACtEM,IAAuBF,EAAK;AAUlC,SACE,gBAAAT,EAAC,aAAQ,WAAAG,GACP,UAAA,gBAAAH;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAW;AAAA,QACX,sBAAAD;AAAA,QACA,gBAde,MAAM;AAC3B,UAAAJ,EAAQM,EAAgB,sBAAsB;AAAA,QAChD;AAAA,QAaQ,cAXa,CAACC,MAAkB;AACtC,UAAAP,EAAQM,EAAgB,wBAAwB,EAAE,OAAAC,EAAA,CAAO;AAAA,QAC3D;AAAA,MASQ;AAAA,MAGF,UAAA,gBAAAd,EAACe,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAX,KAGC,gBAAAY,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAjB,EAACkB,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":"StateTaxesList.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/StateTaxesList.tsx"],"sourcesContent":["import { useTaxRequirementsGetAllSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGetAll'\nimport { Head } from './Head'\nimport { StateTaxesListProvider } from './context'\nimport { Actions } from './Actions'\nimport { List } from './List'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\n/**\n * Props for the {@link StateTaxesList} component.\n *\n * @public\n */\nexport interface StateTaxesListProps extends BaseComponentInterface<'Company.StateTaxes'> {\n /** The associated company identifier. */\n companyId: string\n /**\n * Controls visibility of the Continue button below the state tax list.\n *\n * When `false`, hides the Continue button. Use this when the list is embedded\n * as one step inside a larger flow that provides its own navigation.\n *\n * @defaultValue `true`\n */\n showContinueButton?: boolean\n}\n\n/**\n * Displays the list of state tax requirements for a company with their setup status.\n *\n * @remarks\n * Standalone building block used internally by the orchestrated `StateTaxes` component for its list view. Use this directly when you need full control over navigation between the list and form views.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `company/stateTaxes/edit` | A user chose to edit requirements for a specific state | `{ state: string }` |\n * | `company/stateTaxes/done` | The user chose to proceed to the next step | — |\n *\n * @param props - Component props including the `companyId` whose state tax requirements should be listed.\n * @returns The rendered state taxes list section.\n * @public\n */\nexport function StateTaxesList(props: StateTaxesListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, companyId, showContinueButton = true }: StateTaxesListProps) {\n useI18n('Company.StateTaxes')\n const { onEvent } = useBase()\n const { data } = useTaxRequirementsGetAllSuspense({ companyUuid: companyId })\n const stateTaxRequirements = data.taxRequirementStatesList!\n\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_STATE_TAX_DONE)\n }\n\n const handleChange = (state: string) => {\n onEvent(componentEvents.COMPANY_STATE_TAX_EDIT, { state })\n }\n\n return (\n <section className={className}>\n <StateTaxesListProvider\n value={{\n isPending: false,\n stateTaxRequirements,\n handleContinue,\n handleChange,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <List />\n {showContinueButton && <Actions />}\n </>\n )}\n </Flex>\n </StateTaxesListProvider>\n </section>\n )\n}\n"],"names":["StateTaxesList","props","jsx","BaseComponent","Root","className","children","companyId","showContinueButton","useI18n","onEvent","useBase","data","useTaxRequirementsGetAllSuspense","stateTaxRequirements","StateTaxesListProvider","componentEvents","state","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;AA+CO,SAASA,EAAeC,GAA4B;AACzD,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,UAAAC,GAAU,WAAAC,GAAW,oBAAAC,IAAqB,MAA6B;AAChG,EAAAC,EAAQ,oBAAoB;AAC5B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACd,EAAE,MAAAC,EAAA,IAASC,EAAiC,EAAE,aAAaN,GAAW,GACtEO,IAAuBF,EAAK;AAUlC,SACE,gBAAAV,EAAC,aAAQ,WAAAG,GACP,UAAA,gBAAAH;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAW;AAAA,QACX,sBAAAD;AAAA,QACA,gBAde,MAAM;AAC3B,UAAAJ,EAAQM,EAAgB,sBAAsB;AAAA,QAChD;AAAA,QAaQ,cAXa,CAACC,MAAkB;AACtC,UAAAP,EAAQM,EAAgB,wBAAwB,EAAE,OAAAC,EAAA,CAAO;AAAA,QAC3D;AAAA,MASQ;AAAA,MAGF,UAAA,gBAAAf,EAACgB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAZ,KAGC,gBAAAa,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,QACLd,uBAAuBe,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CAClC,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -9,13 +9,15 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
16
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
17
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesListContext");
18
+ const [f, v] = t("StateTaxesListContext");
17
19
  export {
18
- u as StateTaxesListProvider,
19
- d as useStateTaxesList
20
+ v as StateTaxesListProvider,
21
+ f as useStateTaxesList
20
22
  };
21
23
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { TaxRequirementStatesList } from '@gusto/embedded-api/models/components/taxrequirementstateslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: TaxRequirementStatesList[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { TaxRequirementStatesList } from '@gusto/embedded-api/models/components/taxrequirementstateslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: TaxRequirementStatesList[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
@@ -1,5 +1,6 @@
1
+ import { JSX } from 'react';
2
+ import { FallbackProps } from 'react-error-boundary';
1
3
  import { AddressDefaultValues } from './types';
2
- import { BaseBoundariesProps } from '../../Base/Base';
3
4
  import { ResourceDictionary } from '../../../types/Helpers';
4
5
  import { EventType } from '../../../shared/constants';
5
6
  import { OnEventType } from '../../Base/useBase';
@@ -20,7 +21,7 @@ export interface AddressProps {
20
21
  /** Optional class applied to the wrapping `<section>`. */
21
22
  className?: string;
22
23
  /** Custom React component rendered when an unhandled error is caught by the component-level error boundary. */
23
- FallbackComponent?: BaseBoundariesProps['FallbackComponent'];
24
+ FallbackComponent?: (props: FallbackProps) => JSX.Element;
24
25
  }
25
26
  /**
26
27
  * Form for collecting and updating a contractor's mailing address. Renders a business or home address title based on the contractor type.
@@ -49,4 +50,4 @@ export interface AddressProps {
49
50
  * }
50
51
  * ```
51
52
  */
52
- export declare function Address({ onEvent, FallbackComponent, ...rootProps }: AddressProps): import("react").JSX.Element;
53
+ export declare function Address({ onEvent, FallbackComponent, ...rootProps }: AddressProps): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Address.js","sources":["../../../../src/components/Contractor/Address/Address.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport styles from './Address.module.scss'\nimport { useContractorAddressForm } from './shared/useContractorAddressForm'\nimport type { ContractorAddressOptionalFieldsToRequire } from './shared/useContractorAddressForm'\nimport type { AddressDefaultValues } from './types'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport type { BaseBoundariesProps } from '@/components/Base/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport { Flex, Grid, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { ResourceDictionary } from '@/types/Helpers'\nimport { contractorEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n// The hook defaults to the API contract, which treats every address field as\n// optional. The SDK's address form has always required a complete mailing\n// address, so it opts those fields back into being required here.\nconst SDK_REQUIRED_ADDRESS_FIELDS: ContractorAddressOptionalFieldsToRequire = {\n update: ['street1', 'city', 'state', 'zip'],\n}\n\n/**\n * Props for {@link Address}.\n *\n * @public\n */\nexport interface AddressProps {\n /** The associated contractor identifier. */\n contractorId: string\n /** Pre-fill values for address fields. Server data takes precedence when the contractor already has an address on file. */\n defaultValues?: AddressDefaultValues\n /** Callback invoked each time the component emits an event. */\n onEvent: OnEventType<EventType, unknown>\n /** Overrides for the component's i18n strings. */\n dictionary?: ResourceDictionary<'Contractor.Address'>\n /** Optional class applied to the wrapping `<section>`. */\n className?: string\n /** Custom React component rendered when an unhandled error is caught by the component-level error boundary. */\n FallbackComponent?: BaseBoundariesProps['FallbackComponent']\n}\n\n/**\n * Form for collecting and updating a contractor's mailing address. Renders a business or home address title based on the contractor type.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/address/updated` | Fired after the address is saved | The updated `ContractorAddress` entity |\n * | `contractor/address/done` | Fired after a successful save so the parent flow can advance | — |\n *\n * @param props - See {@link AddressProps}.\n * @returns The contractor address form.\n * @public\n *\n * @example\n * ```tsx\n * import { ContractorOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <ContractorOnboarding.Address\n * contractorId=\"contractor-uuid\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Address({ onEvent, FallbackComponent, ...rootProps }: AddressProps) {\n return (\n <BaseBoundaries componentName=\"Contractor.Address\" FallbackComponent={FallbackComponent}>\n <AddressRoot onEvent={onEvent} {...rootProps} />\n </BaseBoundaries>\n )\n}\n\nfunction AddressRoot({\n contractorId,\n defaultValues,\n onEvent,\n dictionary,\n className,\n}: Omit<AddressProps, 'FallbackComponent'>) {\n useComponentDictionary('Contractor.Address', dictionary)\n useI18n('Contractor.Address')\n const { t } = useTranslation('Contractor.Address')\n const { t: tCommon } = useTranslation('common')\n const Components = useComponentContext()\n\n const contractorAddress = useContractorAddressForm({\n contractorId,\n optionalFieldsToRequire: SDK_REQUIRED_ADDRESS_FIELDS,\n defaultValues,\n })\n\n if (contractorAddress.isLoading) {\n return <BaseLayout isLoading error={contractorAddress.errorHandling.errors} />\n }\n\n const { Fields } = contractorAddress.form\n const isBusiness = contractorAddress.data.contractorType === 'Business'\n\n const handleSubmit = async () => {\n const result = await contractorAddress.actions.onSubmit()\n if (result) {\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_UPDATED, result.data)\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_DONE)\n }\n }\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={contractorAddress.errorHandling.errors}>\n <SDKFormProvider formHookResult={contractorAddress}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32} alignItems=\"stretch\">\n <header>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {isBusiness ? t('businessAddressTitle') : t('homeAddressTitle')}\n </Components.Heading>\n <Components.Text variant=\"supporting\">\n {isBusiness ? t('businessAddressDescription') : t('homeAddressDescription')}\n </Components.Text>\n </Flex>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <Fields.Street1\n label={t('street1')}\n validationMessages={{ REQUIRED: t('validations.street1') }}\n />\n <Fields.Street2 label={t('street2')} />\n <Fields.City\n label={t('city')}\n validationMessages={{ REQUIRED: t('validations.city') }}\n />\n <Fields.State\n label={t('state')}\n placeholder={t('statePlaceholder')}\n validationMessages={{ REQUIRED: t('validations.state') }}\n getOptionLabel={(abbr: string) =>\n tCommon(`statesHash.${abbr}`, { defaultValue: abbr })\n }\n />\n <Fields.Zip\n label={t('zip')}\n validationMessages={{\n REQUIRED: t('validations.zip'),\n INVALID_ZIP: t('validations.zipInvalid'),\n }}\n />\n </Grid>\n\n <ActionsLayout>\n <Components.Button type=\"submit\" isDisabled={contractorAddress.status.isPending}>\n {contractorAddress.status.isPending ? t('submitting') : t('submit')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["SDK_REQUIRED_ADDRESS_FIELDS","Address","onEvent","FallbackComponent","rootProps","jsx","BaseBoundaries","AddressRoot","contractorId","defaultValues","dictionary","className","useComponentDictionary","useI18n","useTranslation","tCommon","Components","useComponentContext","contractorAddress","useContractorAddressForm","BaseLayout","Fields","isBusiness","handleSubmit","result","contractorEvents","classNames","styles","SDKFormProvider","Form","jsxs","Flex","Grid","abbr","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAMA,IAAwE;AAAA,EAC5E,QAAQ,CAAC,WAAW,QAAQ,SAAS,KAAK;AAC5C;AAiDO,SAASC,EAAQ,EAAE,SAAAC,GAAS,mBAAAC,GAAmB,GAAGC,KAA2B;AAClF,SACE,gBAAAC,EAACC,GAAA,EAAe,eAAc,sBAAqB,mBAAAH,GACjD,4BAACI,GAAA,EAAY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AAAhB,EAAC6B,KACC,UAAA,gBAAA7B,EAACW,EAAW,QAAX,EAAkB,MAAK,UAAS,YAAYE,EAAkB,OAAO,WACnE,UAAAA,EAAkB,OAAO,YAAY,EAAE,YAAY,IAAI,EAAE,QAAQ,EAAA,CACpE,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF,GACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"Address.js","sources":["../../../../src/components/Contractor/Address/Address.tsx"],"sourcesContent":["import type { JSX } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport type { FallbackProps } from 'react-error-boundary'\nimport styles from './Address.module.scss'\nimport { useContractorAddressForm } from './shared/useContractorAddressForm'\nimport type { ContractorAddressOptionalFieldsToRequire } from './shared/useContractorAddressForm'\nimport type { AddressDefaultValues } from './types'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport { Flex, Grid, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { ResourceDictionary } from '@/types/Helpers'\nimport { contractorEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n// The hook defaults to the API contract, which treats every address field as\n// optional. The SDK's address form has always required a complete mailing\n// address, so it opts those fields back into being required here.\nconst SDK_REQUIRED_ADDRESS_FIELDS: ContractorAddressOptionalFieldsToRequire = {\n update: ['street1', 'city', 'state', 'zip'],\n}\n\n/**\n * Props for {@link Address}.\n *\n * @public\n */\nexport interface AddressProps {\n /** The associated contractor identifier. */\n contractorId: string\n /** Pre-fill values for address fields. Server data takes precedence when the contractor already has an address on file. */\n defaultValues?: AddressDefaultValues\n /** Callback invoked each time the component emits an event. */\n onEvent: OnEventType<EventType, unknown>\n /** Overrides for the component's i18n strings. */\n dictionary?: ResourceDictionary<'Contractor.Address'>\n /** Optional class applied to the wrapping `<section>`. */\n className?: string\n /** Custom React component rendered when an unhandled error is caught by the component-level error boundary. */\n FallbackComponent?: (props: FallbackProps) => JSX.Element\n}\n\n/**\n * Form for collecting and updating a contractor's mailing address. Renders a business or home address title based on the contractor type.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/address/updated` | Fired after the address is saved | The updated `ContractorAddress` entity |\n * | `contractor/address/done` | Fired after a successful save so the parent flow can advance | — |\n *\n * @param props - See {@link AddressProps}.\n * @returns The contractor address form.\n * @public\n *\n * @example\n * ```tsx\n * import { ContractorOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <ContractorOnboarding.Address\n * contractorId=\"contractor-uuid\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Address({ onEvent, FallbackComponent, ...rootProps }: AddressProps) {\n return (\n <BaseBoundaries componentName=\"Contractor.Address\" FallbackComponent={FallbackComponent}>\n <AddressRoot onEvent={onEvent} {...rootProps} />\n </BaseBoundaries>\n )\n}\n\nfunction AddressRoot({\n contractorId,\n defaultValues,\n onEvent,\n dictionary,\n className,\n}: Omit<AddressProps, 'FallbackComponent'>) {\n useComponentDictionary('Contractor.Address', dictionary)\n useI18n('Contractor.Address')\n const { t } = useTranslation('Contractor.Address')\n const { t: tCommon } = useTranslation('common')\n const Components = useComponentContext()\n\n const contractorAddress = useContractorAddressForm({\n contractorId,\n optionalFieldsToRequire: SDK_REQUIRED_ADDRESS_FIELDS,\n defaultValues,\n })\n\n if (contractorAddress.isLoading) {\n return <BaseLayout isLoading error={contractorAddress.errorHandling.errors} />\n }\n\n const { Fields } = contractorAddress.form\n const isBusiness = contractorAddress.data.contractorType === 'Business'\n\n const handleSubmit = async () => {\n const result = await contractorAddress.actions.onSubmit()\n if (result) {\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_UPDATED, result.data)\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_DONE)\n }\n }\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={contractorAddress.errorHandling.errors}>\n <SDKFormProvider formHookResult={contractorAddress}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32} alignItems=\"stretch\">\n <header>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {isBusiness ? t('businessAddressTitle') : t('homeAddressTitle')}\n </Components.Heading>\n <Components.Text variant=\"supporting\">\n {isBusiness ? t('businessAddressDescription') : t('homeAddressDescription')}\n </Components.Text>\n </Flex>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <Fields.Street1\n label={t('street1')}\n validationMessages={{ REQUIRED: t('validations.street1') }}\n />\n <Fields.Street2 label={t('street2')} />\n <Fields.City\n label={t('city')}\n validationMessages={{ REQUIRED: t('validations.city') }}\n />\n <Fields.State\n label={t('state')}\n placeholder={t('statePlaceholder')}\n validationMessages={{ REQUIRED: t('validations.state') }}\n getOptionLabel={(abbr: string) =>\n tCommon(`statesHash.${abbr}`, { defaultValue: abbr })\n }\n />\n <Fields.Zip\n label={t('zip')}\n validationMessages={{\n REQUIRED: t('validations.zip'),\n INVALID_ZIP: t('validations.zipInvalid'),\n }}\n />\n </Grid>\n\n <ActionsLayout>\n <Components.Button type=\"submit\" isDisabled={contractorAddress.status.isPending}>\n {contractorAddress.status.isPending ? t('submitting') : t('submit')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["SDK_REQUIRED_ADDRESS_FIELDS","Address","onEvent","FallbackComponent","rootProps","jsx","BaseBoundaries","AddressRoot","contractorId","defaultValues","dictionary","className","useComponentDictionary","useI18n","useTranslation","tCommon","Components","useComponentContext","contractorAddress","useContractorAddressForm","BaseLayout","Fields","isBusiness","handleSubmit","result","contractorEvents","classNames","styles","SDKFormProv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,CAAI,IAAI,EAAE,cAAcA,EAAA,CAAM;AAAA,QAAA;AAAA,MAAA;AAAA,MAGxD,gBAAA5B;AAAA,QAACgB,EAAO;AAAA,QAAP;AAAA,UACC,OAAO,EAAE,KAAK;AAAA,UACd,oBAAoB;AAAA,YAClB,UAAU,EAAE,iBAAiB;AAAA,YAC7B,aAAa,EAAE,wBAAwB;AAAA,UAAA;AAAA,QACzC;AAAA,MAAA;AAAA,IACF,GACF;AAAA,IAEA,gBAAAhB,EAAC6B,KACC,UAAA,gBAAA7B,EAACW,EAAW,QAAX,EAAkB,MAAK,UAAS,YAAYE,EAAkB,OAAO,WACnE,UAAAA,EAAkB,OAAO,YAAY,EAAE,YAAY,IAAI,EAAE,QAAQ,EAAA,CACpE,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF,GACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -23,7 +23,7 @@ export type ContractorAddressErrorCode = (typeof ContractorAddressErrorCodes)[ke
23
23
  *
24
24
  * @public
25
25
  */
26
- export type ContractorAddressField = "street1" | "street2" | "city" | "state" | "zip";
26
+ export type ContractorAddressField = "city" | "state" | "street1" | "street2" | "zip";
27
27
  /**
28
28
  * Shape of the values managed by the contractor address form.
29
29
  *
@@ -39,7 +39,7 @@ export type ContractorAddressFormOutputs = ContractorAddressFormData;
39
39
  *
40
40
  * @public
41
41
  */
42
- export type ContractorAddressOptionalFieldsToRequire = { create?: ("street1" | "street2" | "city" | "state" | "zip")[] | undefined; update?: ("street1" | "street2" | "city" | "state" | "zip")[] | undefined; };
42
+ export type ContractorAddressOptionalFieldsToRequire = { create?: ("city" | "state" | "street1" | "street2" | "zip")[] | undefined; update?: ("city" | "state" | "street1" | "street2" | "zip")[] | undefined; };
43
43
  /** @internal */
44
44
  interface ContractorAddressSchemaOptions {
45
45
  optionalFieldsToRequire?: ContractorAddressOptionalFieldsToRequire;
@@ -148,4 +148,4 @@ export type UseContractorAddressFormResult = HookLoadingResult | UseContractorAd
148
148
  *
149
149
  * @public
150
150
  */
151
- export type ContractorAddressFieldsMetadata = { street1: FieldMetadata; street2: FieldMetadata; city: FieldMetadata; state: import("../../../../../partner-hook-utils/types").FieldMetadataWithOptions<"AL" | "AK" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "FL" | "GA" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MD" | "MA" | "MI" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "OH" | "OK" | "OR" | "PA" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VA" | "WA" | "WV" | "WI" | "WY">; zip: FieldMetadata; };
151
+ export type ContractorAddressFieldsMetadata = { street1: FieldMetadata; street2: FieldMetadata; city: FieldMetadata; state: import("../../../../../partner-hook-utils/types").FieldMetadataWithOptions<"AK" | "AL" | "AR" | "AZ" | "CA" | "CO" | "CT" | "DC" | "DE" | "FL" | "GA" | "HI" | "IA" | "ID" | "IL" | "IN" | "KS" | "KY" | "LA" | "MA" | "MD" | "ME" | "MI" | "MN" | "MO" | "MS" | "MT" | "NC" | "ND" | "NE" | "NH" | "NJ" | "NM" | "NV" | "NY" | "OH" | "OK" | "OR" | "PA" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VA" | "VT" | "WA" | "WI" | "WV" | "WY">; zip: FieldMetadata; };
@@ -11,7 +11,7 @@ export interface ContractorListProps extends BaseComponentInterface<'Contractor.
11
11
  successMessage?: string;
12
12
  }
13
13
  /**
14
- * Lists a company's contractors with controls to add, edit, delete, and continue onboarding.
14
+ * Lists a company's contractors with controls to add, edit, delete, cancel self-onboarding, and continue onboarding.
15
15
  *
16
16
  * @events
17
17
  * | Event | Description | Data |
@@ -19,6 +19,7 @@ export interface ContractorListProps extends BaseComponentInterface<'Contractor.
19
19
  * | `contractor/create` | The add-contractor action was triggered. | — |
20
20
  * | `contractor/update` | A contractor row's edit action was triggered. | `{ contractorId: string }` |
21
21
  * | `contractor/deleted` | A contractor was successfully deleted. | `{ contractorId: string }` |
22
+ * | `contractor/selfOnboarding/cancelled` | A contractor's self-onboarding was cancelled, reverting them to admin onboarding. | The updated `contractorOnboardingStatus` returned by the API. |
22
23
  * | `contractor/onboarding/continue` | The continue action was triggered to advance onboarding. | — |
23
24
  *
24
25
  * @param props - See {@link ContractorListProps}.