@gusto/embedded-react-sdk 0.46.0 → 0.46.3

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 (284) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  3. package/dist/components/Common/DataView/DataCards/DataCards.js +14 -13
  4. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  5. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +85 -80
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -0
  9. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -0
  10. package/dist/components/Common/DataView/DataView.d.ts +1 -0
  11. package/dist/components/Common/DataView/DataView.js.map +1 -1
  12. package/dist/components/Common/DataView/useDataView.d.ts +10 -1
  13. package/dist/components/Common/DataView/useDataView.js +20 -17
  14. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  15. package/dist/components/Common/DocumentViewer/DocumentViewer.js +10 -10
  16. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  17. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +9 -9
  18. package/dist/components/Common/PaginationControl/PaginationControl.js +11 -10
  19. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  20. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
  21. package/dist/components/Common/UI/DescriptionList/DescriptionList.js +11 -10
  22. package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
  23. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +4 -4
  24. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  25. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  26. package/dist/components/Common/UI/NumberInput/NumberInput.js +51 -48
  27. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  28. package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  29. package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  35. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  36. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  37. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  38. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  39. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  40. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  41. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  42. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  43. package/dist/components/Company/Industry/Context.js +6 -7
  44. package/dist/components/Company/Industry/Context.js.map +1 -1
  45. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  46. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  47. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  48. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  49. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  50. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  51. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  52. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  53. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  54. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  55. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  56. package/dist/components/Contractor/Address/useAddress.js +5 -6
  57. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  58. package/dist/components/Contractor/Profile/useContractorProfile.js +33 -34
  59. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  60. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.d.ts +9 -0
  61. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js +76 -0
  62. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js.map +1 -0
  63. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js +8 -0
  64. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js.map +1 -0
  65. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +60 -202
  66. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
  67. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.d.ts +25 -0
  68. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +79 -0
  69. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -0
  70. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js +8 -0
  71. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js.map +1 -0
  72. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +18 -0
  73. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +171 -0
  74. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -0
  75. package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
  76. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +6 -1
  77. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +67 -209
  78. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
  79. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js +36 -36
  80. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
  81. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +18 -0
  82. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +169 -0
  83. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -0
  84. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +16 -0
  85. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +36 -30
  86. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  87. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +1 -1
  88. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  89. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  90. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +213 -191
  91. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  92. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  93. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +6 -5
  94. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +162 -131
  95. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  96. package/dist/components/Employee/Dashboard/BasicDetailsView.js +74 -88
  97. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  98. package/dist/components/Employee/Dashboard/Dashboard.js +86 -72
  99. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  100. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -3
  101. package/dist/components/Employee/Dashboard/DashboardComponents.js +138 -101
  102. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  103. package/dist/components/Employee/Dashboard/DocumentsView.js +17 -10
  104. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  105. package/dist/components/Employee/Dashboard/JobAndPayView.js +359 -313
  106. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  107. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +5 -3
  108. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -1
  109. package/dist/components/Employee/Dashboard/TaxesView.js +114 -101
  110. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  111. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +147 -148
  112. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  113. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +6 -0
  114. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +37 -36
  115. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
  116. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +2 -2
  117. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +34 -35
  118. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  119. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +57 -57
  120. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -1
  121. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +14 -5
  122. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +55 -36
  123. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
  124. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  125. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +18 -18
  126. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
  127. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  128. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +3 -3
  129. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
  130. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  131. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  132. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  133. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +37 -40
  134. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  135. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -2
  136. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +64 -71
  137. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
  138. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +2 -0
  139. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +25 -0
  140. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -0
  141. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +13 -0
  142. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +37 -0
  143. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -0
  144. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +6 -0
  145. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +69 -0
  146. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -0
  147. package/dist/components/Employee/EmployeeListFlow/index.d.ts +3 -0
  148. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  149. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +15 -12
  150. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
  151. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +2 -1
  152. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +170 -157
  153. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  154. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +56 -55
  155. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
  156. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +20 -20
  157. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
  158. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  159. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +1 -1
  160. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  161. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
  162. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  163. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  164. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +0 -1
  165. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +11 -12
  166. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
  167. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.test.d.ts +1 -0
  168. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +6 -1
  169. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +95 -94
  170. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  171. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  172. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +6 -1
  173. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +87 -86
  174. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  175. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +18 -18
  176. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
  177. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  178. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  179. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  180. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +14 -11
  181. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
  182. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +2 -1
  183. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +96 -89
  184. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  185. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +61 -60
  186. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
  187. package/dist/components/Employee/exports/employeeManagement.d.ts +2 -0
  188. package/dist/components/Employee/exports/employeeManagement.js +18 -16
  189. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  190. package/dist/components/Employee/index.d.ts +2 -0
  191. package/dist/components/Employee/index.js +32 -30
  192. package/dist/components/Employee/index.js.map +1 -1
  193. package/dist/components/Flow/FlowHeader.js +34 -31
  194. package/dist/components/Flow/FlowHeader.js.map +1 -1
  195. package/dist/components/Flow/useFlow.d.ts +12 -0
  196. package/dist/components/Flow/useFlow.js.map +1 -1
  197. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  198. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  199. package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
  200. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  201. package/dist/components/TimeOff/PolicyList/PolicyList.js +92 -69
  202. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  203. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +23 -23
  204. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  205. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
  206. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  207. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +73 -56
  208. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  209. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +58 -58
  210. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  211. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  212. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +91 -87
  213. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  214. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  215. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +91 -125
  216. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  217. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  218. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +60 -91
  219. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  220. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +4 -4
  221. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +0 -16
  222. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +139 -225
  223. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  224. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +7 -3
  225. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +78 -54
  226. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  227. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.test.d.ts +1 -0
  228. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +12 -11
  229. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  230. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +177 -147
  231. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  232. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +34 -34
  233. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  234. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
  235. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +38 -36
  236. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  237. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
  238. package/dist/helpers/breadcrumbHelpers.d.ts +1 -1
  239. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  240. package/dist/helpers/federalEin.d.ts +1 -0
  241. package/dist/helpers/federalEin.js.map +1 -1
  242. package/dist/helpers/mask.d.ts +8 -4
  243. package/dist/helpers/mask.js.map +1 -1
  244. package/dist/helpers/rem.d.ts +2 -1
  245. package/dist/helpers/rem.js.map +1 -1
  246. package/dist/hooks/useAsyncError.d.ts +1 -0
  247. package/dist/hooks/useAsyncError.js.map +1 -1
  248. package/dist/hooks/useForkRef/useForkRef.d.ts +1 -0
  249. package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
  250. package/dist/i18n/I18n.d.ts +9 -1
  251. package/dist/i18n/I18n.js.map +1 -1
  252. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +14 -14
  253. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +16 -22
  254. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  255. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +17 -15
  256. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
  257. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +9 -9
  258. package/dist/i18n/en/Employee.Compensation.json.js +66 -58
  259. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  260. package/dist/i18n/en/Employee.Dashboard.json.js +28 -24
  261. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  262. package/dist/i18n/en/Employee.HomeAddress.Management.json.js +12 -10
  263. package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -1
  264. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +32 -30
  265. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
  266. package/dist/i18n/en/Employee.PaymentMethod.json.js +25 -25
  267. package/dist/i18n/en/Employee.StateTaxes.json.js +12 -10
  268. package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
  269. package/dist/i18n/en/Employee.WorkAddress.Management.json.js +16 -14
  270. package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -1
  271. package/dist/i18n/en/common.json.d.ts +14 -0
  272. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -32
  273. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  274. package/dist/partner-hook-utils/types.d.ts +4 -0
  275. package/dist/shared/constants.d.ts +2 -0
  276. package/dist/shared/constants.js +13 -12
  277. package/dist/shared/constants.js.map +1 -1
  278. package/dist/style.css +1 -1
  279. package/dist/types/hooks.d.ts +1 -1
  280. package/dist/types/i18next.d.ts +30 -29
  281. package/dist/types/observability.d.ts +1 -1
  282. package/docs/reference/endpoint-inventory.json +24 -8
  283. package/package.json +30 -27
  284. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +0 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,122 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.46.3](https://github.com/Gusto/embedded-react-sdk/compare/v0.46.2...v0.46.3) (2026-06-01)
4
+
5
+ ### Features & Enhancements
6
+
7
+ - allow searching by department in add-employee tables (SDK-892) ([#1959](https://github.com/Gusto/embedded-react-sdk/issues/1959)) ([e610081](https://github.com/Gusto/embedded-react-sdk/commit/e61008103c4a7ab7317086704b3cc61fb9c8b584))
8
+ - **e2e:** reliability hardening — provisioning, loading waits, retries ([#1914](https://github.com/Gusto/embedded-react-sdk/issues/1914)) ([7356c6b](https://github.com/Gusto/embedded-react-sdk/commit/7356c6b94884312ed6a5bac25a6b2edf446a6291)), closes [employeeFlowDrivers#landOnEmployeeOnboardingHome](https://github.com/Gusto/employeeFlowDrivers/issues/landOnEmployeeOnboardingHome) [contractorFlowDrivers#reviewAndSubmitPayment](https://github.com/Gusto/contractorFlowDrivers/issues/reviewAndSubmitPayment) [payrollFlowDrivers#terminateAndRunDismissalPayroll](https://github.com/Gusto/payrollFlowDrivers/issues/terminateAndRunDismissalPayroll) [employeeFlowDrivers#runEmployeeTermination](https://github.com/Gusto/employeeFlowDrivers/issues/runEmployeeTermination) [#1](https://github.com/Gusto/embedded-react-sdk/issues/1) [#4](https://github.com/Gusto/embedded-react-sdk/issues/4) [#2](https://github.com/Gusto/embedded-react-sdk/issues/2) [#5](https://github.com/Gusto/embedded-react-sdk/issues/5)
9
+
10
+ ### Fixes
11
+
12
+ - align wage frequency option copy between add and edit forms (SDK-974) ([#1957](https://github.com/Gusto/embedded-react-sdk/issues/1957)) ([c49aa0e](https://github.com/Gusto/embedded-react-sdk/commit/c49aa0ef298a2571395ba8bf5dfb48d4d7d9f7ee))
13
+ - always show reassignment warning on time off add employees view ([#1960](https://github.com/Gusto/embedded-react-sdk/issues/1960)) ([0d222f9](https://github.com/Gusto/embedded-react-sdk/commit/0d222f97c6925584bb31c56a9d8299131eb6aac7))
14
+ - clear stale compensation field errors when FLSA change disables them ([#1965](https://github.com/Gusto/embedded-react-sdk/issues/1965)) ([16cb010](https://github.com/Gusto/embedded-react-sdk/commit/16cb01048f4fff11ff9f92bc50628a20b3bd0ab0))
15
+ - **Dashboard:** close review modal when all pending changes are cancelled ([#1937](https://github.com/Gusto/embedded-react-sdk/issues/1937)) ([52edc54](https://github.com/Gusto/embedded-react-sdk/commit/52edc540e99a8ff128c363293e4b1b9613cad5c1))
16
+ - **dashboard:** show compensation.title (not job.title) on job & pay row ([#1975](https://github.com/Gusto/embedded-react-sdk/issues/1975)) ([aaaff5a](https://github.com/Gusto/embedded-react-sdk/commit/aaaff5afbce1eac97997fdd6f4439b4266d6ad4f))
17
+ - hide compensation Edit while a pending update exists (SDK-975) ([#1956](https://github.com/Gusto/embedded-react-sdk/issues/1956)) ([5e4bc87](https://github.com/Gusto/embedded-react-sdk/commit/5e4bc87a2dc31430a8091fee80256f7de15dc275))
18
+ - increase default pagination for add-employee flows (SDK-889) ([#1947](https://github.com/Gusto/embedded-react-sdk/issues/1947)) ([44d0540](https://github.com/Gusto/embedded-react-sdk/commit/44d0540b1bd67bcaf687a8b79a7bad8da45a1786))
19
+ - remove confirmation dialog from add employees view (SDK-977) ([#1958](https://github.com/Gusto/embedded-react-sdk/issues/1958)) ([c4dde85](https://github.com/Gusto/embedded-react-sdk/commit/c4dde85651669d5f83ecba051e005a893feb8a19))
20
+ - remove Flex container from job cell in employee dashboard ([#1961](https://github.com/Gusto/embedded-react-sdk/issues/1961)) ([c736551](https://github.com/Gusto/embedded-react-sdk/commit/c736551521644f67e45e3596bd2eabc3c4bc968e))
21
+ - remove Text wrapper from time off balance cell ([#1962](https://github.com/Gusto/embedded-react-sdk/issues/1962)) ([2c69e69](https://github.com/Gusto/embedded-react-sdk/commit/2c69e697daf699105d73e848a74db855a2360e08))
22
+ - render employee steady-state details with DescriptionList ([#1964](https://github.com/Gusto/embedded-react-sdk/issues/1964)) ([2e297db](https://github.com/Gusto/embedded-react-sdk/commit/2e297dbd381a11ddaad962dfad6a11d3d60608ac))
23
+ - **SDK-927:** require Start date in home address creation modal ([#1935](https://github.com/Gusto/embedded-react-sdk/issues/1935)) ([5d2be6c](https://github.com/Gusto/embedded-react-sdk/commit/5d2be6c9034f7f14aca39f0928a1fb156469d7a6))
24
+ - **SDK-928:** reset home address form state when closing the modal ([#1938](https://github.com/Gusto/embedded-react-sdk/issues/1938)) ([50f474d](https://github.com/Gusto/embedded-react-sdk/commit/50f474d434c40967732ec18d536e0055356b9820))
25
+ - **SDK-929:** keep home address modal open on invalid Save ([#1936](https://github.com/Gusto/embedded-react-sdk/issues/1936)) ([9dd04b4](https://github.com/Gusto/embedded-react-sdk/commit/9dd04b4ac8239e5cbf32a707bb59b0132b6b9518))
26
+ - **SDK-933:** track agency-required garnishment fields dynamically ([#1950](https://github.com/Gusto/embedded-react-sdk/issues/1950)) ([df6013c](https://github.com/Gusto/embedded-react-sdk/commit/df6013c30966bc1a3ae731e8923f3db5141794aa))
27
+ - **SDK-934:** stop double-encoding interpolated values in work address banner ([#1953](https://github.com/Gusto/embedded-react-sdk/issues/1953)) ([478d597](https://github.com/Gusto/embedded-react-sdk/commit/478d597907fd8d4d12fae28e2775e48b9082d8a2)), closes [#39](https://github.com/Gusto/embedded-react-sdk/issues/39)
28
+ - **SDK-935:** expose Start date in the home address Edit modal ([#1982](https://github.com/Gusto/embedded-react-sdk/issues/1982)) ([eab07d8](https://github.com/Gusto/embedded-react-sdk/commit/eab07d8d0e93a39fbab1c001130c802a0f8dde65))
29
+ - **SDK-936:** edit just-created home/work address without page-level loading ([#1939](https://github.com/Gusto/embedded-react-sdk/issues/1939)) ([64de9c8](https://github.com/Gusto/embedded-react-sdk/commit/64de9c8631169daf3ea1fb993ec8109d6601c8dc))
30
+ - **SDK-937:** switch Amount helper text when toggling Percentage / Fixed ([#1973](https://github.com/Gusto/embedded-react-sdk/issues/1973)) ([77602a7](https://github.com/Gusto/embedded-react-sdk/commit/77602a7e9374605127634670c2ecb06364c6ffab))
31
+ - **SDK-938:** show a format-specific message for invalid account numbers ([#1951](https://github.com/Gusto/embedded-react-sdk/issues/1951)) ([38a8db5](https://github.com/Gusto/embedded-react-sdk/commit/38a8db55eed510270aaeb1ea07c17a8a9686eea8))
32
+ - **SDK-940:** make Documents tab forms table flush with its container ([#1952](https://github.com/Gusto/embedded-react-sdk/issues/1952)) ([13c3a5f](https://github.com/Gusto/embedded-react-sdk/commit/13c3a5fa46bb5ccc3335447a90a1d25d38d29734))
33
+ - **SDK-942:** handle no-income-tax states in State taxes card and edit form ([#1954](https://github.com/Gusto/embedded-react-sdk/issues/1954)) ([aab92b3](https://github.com/Gusto/embedded-react-sdk/commit/aab92b312d738a20a39480fbf792ff6abc79aab5))
34
+ - **SDK-946:** remount DocumentViewer embed when the PDF url changes ([#1955](https://github.com/Gusto/embedded-react-sdk/issues/1955)) ([5222623](https://github.com/Gusto/embedded-react-sdk/commit/5222623df12c67bf24578cc771cfd9ee38528af6))
35
+ - **SDK-948:** hide PDF viewer black-flash behind page background ([#1974](https://github.com/Gusto/embedded-react-sdk/issues/1974)) ([6368a06](https://github.com/Gusto/embedded-react-sdk/commit/6368a060dfa044f4ad38a5e0f235f63ed4baf39e))
36
+ - **SDK-949:** select existing value when a NumberInput is focused ([#1971](https://github.com/Gusto/embedded-react-sdk/issues/1971)) ([77d7e08](https://github.com/Gusto/embedded-react-sdk/commit/77d7e0878ed2f815c91d95739b8be469f19d251f))
37
+ - **SDK-978:** preserve secondary compensation effective_date when primary hire_date changes ([#1972](https://github.com/Gusto/embedded-react-sdk/issues/1972)) ([38642f6](https://github.com/Gusto/embedded-react-sdk/commit/38642f67e3fe7d79a91e5404fa4b629d3b9853d2))
38
+ - use max-width to constrain starting balance input width (SDK-893) ([#1949](https://github.com/Gusto/embedded-react-sdk/issues/1949)) ([347aba5](https://github.com/Gusto/embedded-react-sdk/commit/347aba509d8118bef73b927421cfcd568a801821))
39
+
40
+ ### Chores & Maintenance
41
+
42
+ - colorize ASCII art banners with Gusto coral ([#1966](https://github.com/Gusto/embedded-react-sdk/issues/1966)) ([e593d2c](https://github.com/Gusto/embedded-react-sdk/commit/e593d2c6e81d07aa7ebc6d27ff40bef759886fad)), closes [#F45D48](https://github.com/Gusto/embedded-react-sdk/issues/F45D48)
43
+ - **deps-dev:** bump @commitlint/config-conventional from 21.0.1 to 21.0.2 ([#1978](https://github.com/Gusto/embedded-react-sdk/issues/1978)) ([2f53edc](https://github.com/Gusto/embedded-react-sdk/commit/2f53edc90e9bae3fcc7f8c0f4e2bc209f23af6bc))
44
+ - **deps-dev:** bump @release-it/conventional-changelog from 11.0.0 to 11.0.1 ([#1979](https://github.com/Gusto/embedded-react-sdk/issues/1979)) ([7b7ae8f](https://github.com/Gusto/embedded-react-sdk/commit/7b7ae8fe79e1eef046248c71c05ef4ac62865eff))
45
+ - **deps-dev:** bump @storybook/addon-a11y from 10.4.0 to 10.4.1 ([#1931](https://github.com/Gusto/embedded-react-sdk/issues/1931)) ([3962ee5](https://github.com/Gusto/embedded-react-sdk/commit/3962ee543949d7f3dbdde71c6955e208f2bf87f6))
46
+ - **deps-dev:** bump @storybook/addon-docs from 10.4.0 to 10.4.1 ([#1927](https://github.com/Gusto/embedded-react-sdk/issues/1927)) ([90b9e7e](https://github.com/Gusto/embedded-react-sdk/commit/90b9e7e45fdaf054b5b92755ff110366af090a9d))
47
+ - **deps-dev:** bump @storybook/addon-onboarding from 10.4.0 to 10.4.1 ([#1925](https://github.com/Gusto/embedded-react-sdk/issues/1925)) ([dbdc532](https://github.com/Gusto/embedded-react-sdk/commit/dbdc532a3399e6e39b1390912fb2a32e3bd0c169))
48
+ - **deps-dev:** bump @storybook/react-vite from 10.4.0 to 10.4.1 ([#1929](https://github.com/Gusto/embedded-react-sdk/issues/1929)) ([465768d](https://github.com/Gusto/embedded-react-sdk/commit/465768d18e23431f4733816b6713960c7a9aeea2))
49
+ - **deps-dev:** bump eslint-plugin-storybook from 10.4.0 to 10.4.1 ([#1932](https://github.com/Gusto/embedded-react-sdk/issues/1932)) ([561bcca](https://github.com/Gusto/embedded-react-sdk/commit/561bcca6851723c6032e4fcea193c2ee7d6e73ff))
50
+ - **deps-dev:** bump lint-staged from 17.0.5 to 17.0.7 ([#1981](https://github.com/Gusto/embedded-react-sdk/issues/1981)) ([0e01c04](https://github.com/Gusto/embedded-react-sdk/commit/0e01c04c36a75498cfa86c5548de1abbbd02c2d4))
51
+ - **deps-dev:** bump react-router-dom from 7.15.1 to 7.16.0 ([#1970](https://github.com/Gusto/embedded-react-sdk/issues/1970)) ([6312d9d](https://github.com/Gusto/embedded-react-sdk/commit/6312d9d985c036da25e4bc73017def7aacabdcc8))
52
+ - **deps-dev:** bump release-it from 20.0.1 to 20.2.0 ([#1977](https://github.com/Gusto/embedded-react-sdk/issues/1977)) ([1349ea6](https://github.com/Gusto/embedded-react-sdk/commit/1349ea679b8720333d72364555e83e8a08eb3081))
53
+ - **deps-dev:** bump sass-embedded from 1.99.0 to 1.100.0 ([#1912](https://github.com/Gusto/embedded-react-sdk/issues/1912)) ([b60e3f9](https://github.com/Gusto/embedded-react-sdk/commit/b60e3f98091eed5002984fd3384f8443bc3474d8))
54
+ - **deps-dev:** bump typescript-eslint from 8.59.4 to 8.60.0 ([#1930](https://github.com/Gusto/embedded-react-sdk/issues/1930)) ([4fd978d](https://github.com/Gusto/embedded-react-sdk/commit/4fd978df43e0f2c844ef28c476f89f431614ddc5))
55
+ - **deps-dev:** bump vite-plugin-checker from 0.13.0 to 0.14.1 ([#1945](https://github.com/Gusto/embedded-react-sdk/issues/1945)) ([89eda8a](https://github.com/Gusto/embedded-react-sdk/commit/89eda8ac14d4a8274c21e69011d9a2e10f3d9cb1))
56
+ - **deps:** bump @hookform/resolvers from 5.2.2 to 5.4.0 ([#1911](https://github.com/Gusto/embedded-react-sdk/issues/1911)) ([93fda39](https://github.com/Gusto/embedded-react-sdk/commit/93fda396e2cea94ca4d693bcf0f3e0f68c83d4fb))
57
+ - **deps:** bump @internationalized/date from 3.12.1 to 3.12.2 ([#1969](https://github.com/Gusto/embedded-react-sdk/issues/1969)) ([1c9a377](https://github.com/Gusto/embedded-react-sdk/commit/1c9a377098aecd6479a21b36821ffbc0fcbf39f8))
58
+ - **deps:** bump @internationalized/number from 3.6.6 to 3.6.7 ([#1968](https://github.com/Gusto/embedded-react-sdk/issues/1968)) ([82331bf](https://github.com/Gusto/embedded-react-sdk/commit/82331bf3af9144fe941475d6ff77acdbf7d542cb))
59
+ - **deps:** bump dompurify from 3.4.5 to 3.4.7 ([#1944](https://github.com/Gusto/embedded-react-sdk/issues/1944)) ([bf47a3c](https://github.com/Gusto/embedded-react-sdk/commit/bf47a3cd939eb265512a51467d8d1aeefb1afeee))
60
+ - **deps:** bump i18next from 26.2.0 to 26.3.0 ([#1946](https://github.com/Gusto/embedded-react-sdk/issues/1946)) ([8176319](https://github.com/Gusto/embedded-react-sdk/commit/81763196b355a43dcc53883be1f0792bc410ca03))
61
+ - **deps:** bump react-error-boundary from 6.1.1 to 6.1.2 ([#1926](https://github.com/Gusto/embedded-react-sdk/issues/1926)) ([8097fec](https://github.com/Gusto/embedded-react-sdk/commit/8097fecfd443d3d523e5ea3a9571c5c82ffac2e9))
62
+ - **deps:** bump react-hook-form from 7.76.0 to 7.76.1 ([#1928](https://github.com/Gusto/embedded-react-sdk/issues/1928)) ([e686f90](https://github.com/Gusto/embedded-react-sdk/commit/e686f90e5b3a36703055526ead5a0132cb925269))
63
+ - **lint:** re-enable trivially-clean strict typescript-eslint rules ([#1924](https://github.com/Gusto/embedded-react-sdk/issues/1924)) ([77900d5](https://github.com/Gusto/embedded-react-sdk/commit/77900d5771c70813c86a3b02c22ebbbbd96f1184))
64
+ - remove ReadMe docs publishing pipeline ([#1940](https://github.com/Gusto/embedded-react-sdk/issues/1940)) ([f4a4c99](https://github.com/Gusto/embedded-react-sdk/commit/f4a4c99fd171c539837afe0e2be6c04393f7c124))
65
+ - **SDK-899:** add RFC for autogenerated API docs ([#1942](https://github.com/Gusto/embedded-react-sdk/issues/1942)) ([1380f06](https://github.com/Gusto/embedded-react-sdk/commit/1380f069a894e88514ed28485057b9e1937a0e2d))
66
+ - **SDK-970:** install eslint-plugin-tsdoc to lint comment syntax ([#1963](https://github.com/Gusto/embedded-react-sdk/issues/1963)) ([85fd0f0](https://github.com/Gusto/embedded-react-sdk/commit/85fd0f07e2641b98c4b9afa7a506b7f55c5381c1))
67
+ - **SDK-970:** lint tsdoc coverage and quality ([#1967](https://github.com/Gusto/embedded-react-sdk/issues/1967)) ([7ff453d](https://github.com/Gusto/embedded-react-sdk/commit/7ff453dfffbd814b4cf343f4c39382742e5edc27))
68
+ - stand up Docusaurus site for ongoing docs work ([#1943](https://github.com/Gusto/embedded-react-sdk/issues/1943)) ([a659e82](https://github.com/Gusto/embedded-react-sdk/commit/a659e82f23450630618959fc77b54e3db75a80a9))
69
+
70
+ ## [0.46.2](https://github.com/Gusto/embedded-react-sdk/compare/v0.46.0...v0.46.2) (2026-05-22)
71
+
72
+ ### Features & Enhancements
73
+
74
+ - **compensation:** enforce effectiveDate floor via Zod schema with distinct error messages ([#1919](https://github.com/Gusto/embedded-react-sdk/issues/1919)) ([c1bfb2c](https://github.com/Gusto/embedded-react-sdk/commit/c1bfb2c796eb05d8ef70c75426dd80ad016b1e6c))
75
+ - **Dashboard:** fix pending compensation edit — route date field by job type ([#1909](https://github.com/Gusto/embedded-react-sdk/issues/1909)) ([362d94f](https://github.com/Gusto/embedded-react-sdk/commit/362d94f9d27e260f4492f1ea1241be31ceda8b04))
76
+ - **dashboard:** show Pending badge for future-dated compensations on job card and table ([#1897](https://github.com/Gusto/embedded-react-sdk/issues/1897)) ([41031b4](https://github.com/Gusto/embedded-react-sdk/commit/41031b48e45b4bf03ea69d0df51c6b59e29230f3))
77
+ - **Dashboard:** wire add-job and add-another-job compensation forms ([#1898](https://github.com/Gusto/embedded-react-sdk/issues/1898)) ([bd0ecff](https://github.com/Gusto/embedded-react-sdk/commit/bd0ecff3b3752b2ce6fd1780df55976f31d24cff))
78
+ - **SDK-517:** add EmployeeListFlow for management employee navigation ([#1921](https://github.com/Gusto/embedded-react-sdk/issues/1921)) ([3304000](https://github.com/Gusto/embedded-react-sdk/commit/330400023966c5b4b641f1d2a65b043acf6f123e))
79
+
80
+ ### Fixes
81
+
82
+ - always show Create Policy button in page header ([#1905](https://github.com/Gusto/embedded-react-sdk/issues/1905)) ([962b8a4](https://github.com/Gusto/embedded-react-sdk/commit/962b8a4a88f31d087fd48e0c9a4b341c8c316b03))
83
+ - block switching between unlimited and accrual-based time off policy types ([#1900](https://github.com/Gusto/embedded-react-sdk/issues/1900)) ([b3e737b](https://github.com/Gusto/embedded-react-sdk/commit/b3e737b08a700fdb9426b7b33577fd98b69a6f8a))
84
+ - clarify policy deletion error when pending requests exist ([#1906](https://github.com/Gusto/embedded-react-sdk/issues/1906)) ([d4cdb8a](https://github.com/Gusto/embedded-react-sdk/commit/d4cdb8ac81cb23f9141a60e7b0d531c74b2d2693))
85
+ - close remove-employee modal on error and clear stale errors in balance modal ([#1899](https://github.com/Gusto/embedded-react-sdk/issues/1899)) ([0987443](https://github.com/Gusto/embedded-react-sdk/commit/0987443147881b074a2c224e150e0bbeaf364e21))
86
+ - **Dashboard:** show pending compensation changes including title ([#1908](https://github.com/Gusto/embedded-react-sdk/issues/1908)) ([420e8e3](https://github.com/Gusto/embedded-react-sdk/commit/420e8e3956a50aedc1fa039284b3594525368c8a))
87
+ - **Dashboard:** unblock paystub download — drop noopener and defer blob URL revoke ([#1915](https://github.com/Gusto/embedded-react-sdk/issues/1915)) ([507bb47](https://github.com/Gusto/embedded-react-sdk/commit/507bb47812d915c19fe5163746d9e05af15ff0c2))
88
+ - **Deductions:** await column header render before asserting in DeductionsList test ([#1910](https://github.com/Gusto/embedded-react-sdk/issues/1910)) ([3f005ad](https://github.com/Gusto/embedded-react-sdk/commit/3f005adb802af1b73b8e7c33b8a4d1756d823706))
89
+ - fall back to first job title when no primary job is flagged ([#1902](https://github.com/Gusto/embedded-react-sdk/issues/1902)) ([729dbdb](https://github.com/Gusto/embedded-react-sdk/commit/729dbdb214020fdaba0b94f6f4e6f729e4e11e70))
90
+ - hide assigned employees from time-off add list (SDK-894) ([#1843](https://github.com/Gusto/embedded-react-sdk/issues/1843)) ([acb6194](https://github.com/Gusto/embedded-react-sdk/commit/acb6194e164df578bd23e946b7ccb58c92080134)), closes [#1887](https://github.com/Gusto/embedded-react-sdk/issues/1887) [#1849](https://github.com/Gusto/embedded-react-sdk/issues/1849)
91
+ - preserve carry-over balances when adding employees to policy ([#1907](https://github.com/Gusto/embedded-react-sdk/issues/1907)) ([094a9fc](https://github.com/Gusto/embedded-react-sdk/commit/094a9fc587716efb09a4ec8ed42e4275eb060f9a))
92
+ - preserve date picker state when switching back from unlimited ([#1904](https://github.com/Gusto/embedded-react-sdk/issues/1904)) ([fa9e0b0](https://github.com/Gusto/embedded-react-sdk/commit/fa9e0b08cc978da58357a699ef38cf46ce152ac1))
93
+ - provide descriptive error when balance update exceeds policy max ([#1903](https://github.com/Gusto/embedded-react-sdk/issues/1903)) ([88af535](https://github.com/Gusto/embedded-react-sdk/commit/88af535ff68c613301f0afb0aa1db66889f08db9))
94
+ - route holiday Add Employees back button to policy detail ([#1918](https://github.com/Gusto/embedded-react-sdk/issues/1918)) ([1db88fd](https://github.com/Gusto/embedded-react-sdk/commit/1db88fd17f0d272f0aa45d179ddab166df7cd29a))
95
+ - use fresh compensation version from job PUT response in EditPendingCompensation ([#1920](https://github.com/Gusto/embedded-react-sdk/issues/1920)) ([9de8a5b](https://github.com/Gusto/embedded-react-sdk/commit/9de8a5bb403ecefbe585f62ea61f89209cd0186e))
96
+
97
+ ### Chores & Maintenance
98
+
99
+ - release 0.46.1 ([#1916](https://github.com/Gusto/embedded-react-sdk/issues/1916)) ([3acabc3](https://github.com/Gusto/embedded-react-sdk/commit/3acabc3bcbae06c36fdd38a36bd6a675c7967c77))
100
+
101
+ ## [0.46.1](https://github.com/Gusto/embedded-react-sdk/compare/v0.46.0...v0.46.1) (2026-05-22)
102
+
103
+ ### Features & Enhancements
104
+
105
+ - Route the date field by job type when editing a pending compensation on the Employee Dashboard ([#1909](https://github.com/Gusto/embedded-react-sdk/issues/1909))
106
+ - Show a "Pending" badge on the Employee Dashboard job card and jobs table for compensations with a future effective date ([#1897](https://github.com/Gusto/embedded-react-sdk/issues/1897))
107
+ - Wire up the add-job and add-another-job compensation forms in the Employee Dashboard ([#1898](https://github.com/Gusto/embedded-react-sdk/issues/1898))
108
+
109
+ ### Fixes
110
+
111
+ - Fix paystub download from the Employee Dashboard Job and Pay tab — the new tab no longer stays blank ([#1915](https://github.com/Gusto/embedded-react-sdk/issues/1915))
112
+ - Show the job title in pending compensation change alerts on the Employee Dashboard ([#1908](https://github.com/Gusto/embedded-react-sdk/issues/1908))
113
+ - Fall back to the first job's title when no primary job is flagged ([#1902](https://github.com/Gusto/embedded-react-sdk/issues/1902))
114
+ - Always show the Create Policy button in the time-off policy page header ([#1905](https://github.com/Gusto/embedded-react-sdk/issues/1905))
115
+ - Hide already-assigned employees from the time-off policy add-employees list ([#1843](https://github.com/Gusto/embedded-react-sdk/issues/1843))
116
+ - Preserve the date picker selection when switching the time-off policy balance back from unlimited ([#1904](https://github.com/Gusto/embedded-react-sdk/issues/1904))
117
+ - Show a descriptive error when a time-off balance update exceeds the policy maximum ([#1903](https://github.com/Gusto/embedded-react-sdk/issues/1903))
118
+ - Close the remove-employee modal on error and clear stale errors in the balance modal ([#1899](https://github.com/Gusto/embedded-react-sdk/issues/1899))
119
+
3
120
  ## [0.46.0](https://github.com/Gusto/embedded-react-sdk/compare/v0.45.0...v0.46.0) (2026-05-21)
4
121
 
5
122
  ### Features & Enhancements
@@ -8,9 +8,10 @@ export type DataCardsProps<T> = {
8
8
  onSelect?: (item: T, checked: boolean) => void;
9
9
  onSelectAll?: (checked: boolean, visibleData: T[]) => void;
10
10
  getIsItemSelected?: (item: T) => boolean;
11
+ hideSelectAll?: useDataViewPropReturn<T>['hideSelectAll'];
11
12
  emptyState?: useDataViewPropReturn<T>['emptyState'];
12
13
  footer?: useDataViewPropReturn<T>['footer'];
13
14
  selectionMode?: SelectionMode;
14
15
  isWithinBox?: TableProps['isWithinBox'];
15
16
  };
16
- export declare const DataCards: <T>({ label, data, columns, itemMenu, onSelect, onSelectAll, getIsItemSelected, emptyState, footer, selectionMode, isWithinBox, }: DataCardsProps<T>) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const DataCards: <T>({ label, data, columns, itemMenu, onSelect, onSelectAll, getIsItemSelected, hideSelectAll, emptyState, footer, selectionMode, isWithinBox, }: DataCardsProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { useId as D } from "react";
3
- import T from "classnames";
4
- import { useTranslation as j } from "react-i18next";
2
+ import { useId as T } from "react";
3
+ import j from "classnames";
4
+ import { useTranslation as A } from "react-i18next";
5
5
  import a from "./DataCards.module.scss.js";
6
- import { useSelectionState as A } from "../useSelectionState.js";
6
+ import { useSelectionState as H } from "../useSelectionState.js";
7
7
  import { Flex as N } from "../../Flex/Flex.js";
8
- import { useComponentContext as H } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
- const E = ({
8
+ import { useComponentContext as V } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ const I = ({
10
10
  label: x,
11
11
  data: s,
12
12
  columns: h,
@@ -14,18 +14,19 @@ const E = ({
14
14
  onSelect: c,
15
15
  onSelectAll: g,
16
16
  getIsItemSelected: m,
17
+ hideSelectAll: w,
17
18
  emptyState: f,
18
19
  footer: v,
19
20
  selectionMode: C = "multiple",
20
21
  isWithinBox: d
21
22
  }) => {
22
- const o = H(), { t: u } = j("common"), w = D(), { allSelected: L } = A(s, m), R = (l, n) => {
23
+ const o = V(), { t: u } = A("common"), L = T(), { allSelected: R } = H(s, m), D = (l, n) => {
23
24
  if (!c) return;
24
25
  const r = m?.(l) ?? !1;
25
26
  return C === "single" ? /* @__PURE__ */ e(
26
27
  o.Radio,
27
28
  {
28
- name: w,
29
+ name: L,
29
30
  value: r,
30
31
  onChange: () => {
31
32
  c(l, !0);
@@ -45,11 +46,11 @@ const E = ({
45
46
  }
46
47
  );
47
48
  };
48
- return /* @__PURE__ */ t("div", { className: T(a.root, d && a.withinBox), "data-testid": "data-cards", children: [
49
- c && m && C === "multiple" && s.length > 0 && /* @__PURE__ */ e("div", { className: a.selectAllRow, children: /* @__PURE__ */ e(
49
+ return /* @__PURE__ */ t("div", { className: j(a.root, d && a.withinBox), "data-testid": "data-cards", children: [
50
+ c && m && C === "multiple" && !w && s.length > 0 && /* @__PURE__ */ e("div", { className: a.selectAllRow, children: /* @__PURE__ */ e(
50
51
  o.Checkbox,
51
52
  {
52
- value: L,
53
+ value: R,
53
54
  onChange: (l) => g?.(l, s),
54
55
  label: u("card.selectAllRowsLabel")
55
56
  }
@@ -60,7 +61,7 @@ const E = ({
60
61
  o.Card,
61
62
  {
62
63
  menu: p && p(l),
63
- action: R(l),
64
+ action: D(l),
64
65
  className: d ? a.flushCard : void 0,
65
66
  children: h.map((r, i) => /* @__PURE__ */ t(N, { flexDirection: "column", gap: 0, children: [
66
67
  r.title && /* @__PURE__ */ e("h5", { className: a.columnTitle, children: r.title }),
@@ -85,6 +86,6 @@ const E = ({
85
86
  ] });
86
87
  };
87
88
  export {
88
- E as DataCards
89
+ I as DataCards
89
90
  };
90
91
  //# sourceMappingURL=DataCards.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataCards.js","sources":["../../../../../src/components/Common/DataView/DataCards/DataCards.tsx"],"sourcesContent":["import { useId } from 'react'\nimport cn from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport styles from './DataCards.module.scss'\nimport type { useDataViewPropReturn, SelectionMode } from '@/components/Common/DataView/useDataView'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport { useSelectionState } from '@/components/Common/DataView/useSelectionState'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataCardsProps<T> = {\n label: string\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: (item: T, checked: boolean) => void\n onSelectAll?: (checked: boolean, visibleData: T[]) => void\n getIsItemSelected?: (item: T) => boolean\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n selectionMode?: SelectionMode\n isWithinBox?: TableProps['isWithinBox']\n}\n\nexport const DataCards = <T,>({\n label,\n data,\n columns,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n emptyState,\n footer,\n selectionMode = 'multiple',\n isWithinBox,\n}: DataCardsProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const radioGroupName = useId()\n const { allSelected } = useSelectionState(data, getIsItemSelected)\n\n const renderAction = (item: T, index: number) => {\n if (!onSelect) return undefined\n\n const isSelected = getIsItemSelected?.(item) ?? false\n\n if (selectionMode === 'single') {\n return (\n <Components.Radio\n name={radioGroupName}\n value={isSelected}\n onChange={() => {\n onSelect(item, true)\n }}\n label={t('card.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n return (\n <Components.Checkbox\n value={isSelected}\n onChange={(checked: boolean) => {\n onSelect(item, checked)\n }}\n label={t('card.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n return (\n <div className={cn(styles.root, isWithinBox && styles.withinBox)} data-testid=\"data-cards\">\n {onSelect && getIsItemSelected && selectionMode === 'multiple' && data.length > 0 && (\n <div className={styles.selectAllRow}>\n <Components.Checkbox\n value={allSelected}\n onChange={(checked: boolean) => onSelectAll?.(checked, data)}\n label={t('card.selectAllRowsLabel')}\n />\n </div>\n )}\n <div role=\"list\" aria-label={label}>\n {data.length === 0 && emptyState && (\n <div role=\"listitem\">\n <Components.Card className={isWithinBox ? styles.flushCard : undefined}>\n {emptyState()}\n </Components.Card>\n </div>\n )}\n {data.map((item, index) => (\n <div role=\"listitem\" key={index}>\n <Components.Card\n menu={itemMenu && itemMenu(item)}\n action={renderAction(item, index)}\n className={isWithinBox ? styles.flushCard : undefined}\n >\n {columns.map((column, colIndex) => (\n <Flex key={colIndex} flexDirection=\"column\" gap={0}>\n {column.title && <h5 className={styles.columnTitle}>{column.title}</h5>}\n <div className={styles.columnData}>\n {' '}\n {column.render ? column.render(item) : String(item[column.key as keyof T])}\n </div>\n </Flex>\n ))}\n </Components.Card>\n </div>\n ))}\n {footer && (\n <div role=\"listitem\">\n <Components.Card className={isWithinBox ? styles.flushCard : undefined}>\n {(() => {\n const footerContent = footer()\n\n return Object.entries(footerContent).map(([key, content]) => {\n const columnIndex = key.startsWith('column-')\n ? parseInt(key.replace('column-', ''), 10)\n : -1\n const columnTitle = columnIndex >= 0 ? columns[columnIndex]?.title : undefined\n\n return (\n <Flex key={key} flexDirection=\"column\" gap={0}>\n {columnTitle && <h5 className={styles.columnTitle}>{columnTitle}</h5>}\n <div className={styles.footerItem}>{content}</div>\n </Flex>\n )\n })\n })()}\n </Components.Card>\n </div>\n )}\n </div>\n </div>\n )\n}\n"],"names":["DataCards","label","data","columns","itemMenu","onSelect","onSelectAll","getIsItemSelected","emptyState","footer","selectionMode","isWithinBox","Components","useComponentContext","t","useTranslation","radioGroupName","useId","allSelected","useSelectionState","renderAction","item","index","isSelected","jsx","checked","jsxs","cn","styles","column","colIndex","Flex","footerContent","key","content","columnIndex","columnTitle"],"mappings":";;;;;;;;AAwBO,MAAMA,IAAY,CAAK;AAAA,EAC5B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,aAAAC;AACF,MAAyB;AACvB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAiBC,EAAA,GACjB,EAAE,aAAAC,EAAA,IAAgBC,EAAkBjB,GAAMK,CAAiB,GAE3Da,IAAe,CAACC,GAASC,MAAkB;AAC/C,QAAI,CAACjB,EAAU;AAEf,UAAMkB,IAAahB,IAAoBc,CAAI,KAAK;AAEhD,WAAIX,MAAkB,WAElB,gBAAAc;AAAA,MAACZ,EAAW;AAAA,MAAX;AAAA,QACC,MAAMI;AAAA,QACN,OAAOO;AAAA,QACP,UAAU,MAAM;AACd,UAAAlB,EAASgB,GAAM,EAAI;AAAA,QACrB;AAAA,QACA,OAAOP,EAAE,qBAAqB;AAAA,QAC9B,yBAAuB;AAAA,MAAA;AAAA,IAAA,IAM3B,gBAAAU;AAAA,MAACZ,EAAW;AAAA,MAAX;AAAA,QACC,OAAOW;AAAA,QACP,UAAU,CAACE,MAAqB;AAC9B,UAAApB,EAASgB,GAAMI,CAAO;AAAA,QACxB;AAAA,QACA,OAAOX,EAAE,qBAAqB;AAAA,QAC9B,yBAAuB;AAAA,MAAA;AAAA,IAAA;AAAA,EAG7B;AAEA,SACE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,CAC3E;AAAA,UAAA,EAAA,GALSC,CAMX,CACD;AAAA,QAAA;AAAA,MAAA,EACH,GAfwBR,CAgB1B,CACD;AAAA,MACAb,KACC,gBAAAe,EAAC,OAAA,EAAI,MAAK,YACR,UAAA,gBAAAA,EAACZ,EAAW,MAAX,EAAgB,WAAWD,IAAciB,EAAO,YAAY,QACzD,WAAA,MAAM;AACN,cAAMI,IAAgBvB,EAAA;AAEtB,eAAO,OAAO,QAAQuB,CAAa,EAAE,IAAI,CAAC,CAACC,GAAKC,CAAO,MAAM;AAC3D,gBAAMC,IAAcF,EAAI,WAAW,SAAS,IACxC,SAASA,EAAI,QAAQ,WAAW,EAAE,GAAG,EAAE,IACvC,IACEG,IAAcD,KAAe,IAAIhC,EAAQgC,CAAW,GAAG,QAAQ;AAErE,iBACE,gBAAAT,EAACK,GAAA,EAAe,eAAc,UAAS,KAAK,GACzC,UAAA;AAAA,YAAAK,KAAe,gBAAAZ,EAAC,MAAA,EAAG,WAAWI,EAAO,aAAc,UAAAQ,GAAY;AAAA,YAChE,gBAAAZ,EAAC,OAAA,EAAI,WAAWI,EAAO,YAAa,UAAAM,EAAA,CAAQ;AAAA,UAAA,EAAA,GAFnCD,CAGX;AAAA,QAEJ,CAAC;AAAA,MACH,GAAA,GACF,EAAA,CACF;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"DataCards.js","sources":["../../../../../src/components/Common/DataView/DataCards/DataCards.tsx"],"sourcesContent":["import { useId } from 'react'\nimport cn from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport styles from './DataCards.module.scss'\nimport type { useDataViewPropReturn, SelectionMode } from '@/components/Common/DataView/useDataView'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport { useSelectionState } from '@/components/Common/DataView/useSelectionState'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataCardsProps<T> = {\n label: string\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: (item: T, checked: boolean) => void\n onSelectAll?: (checked: boolean, visibleData: T[]) => void\n getIsItemSelected?: (item: T) => boolean\n hideSelectAll?: useDataViewPropReturn<T>['hideSelectAll']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n selectionMode?: SelectionMode\n isWithinBox?: TableProps['isWithinBox']\n}\n\nexport const DataCards = <T,>({\n label,\n data,\n columns,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n hideSelectAll,\n emptyState,\n footer,\n selectionMode = 'multiple',\n isWithinBox,\n}: DataCardsProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const radioGroupName = useId()\n const { allSelected } = useSelectionState(data, getIsItemSelected)\n\n const renderAction = (item: T, index: number) => {\n if (!onSelect) return undefined\n\n const isSelected = getIsItemSelected?.(item) ?? false\n\n if (selectionMode === 'single') {\n return (\n <Components.Radio\n name={radioGroupName}\n value={isSelected}\n onChange={() => {\n onSelect(item, true)\n }}\n label={t('card.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n return (\n <Components.Checkbox\n value={isSelected}\n onChange={(checked: boolean) => {\n onSelect(item, checked)\n }}\n label={t('card.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n return (\n <div className={cn(styles.root, isWithinBox && styles.withinBox)} data-testid=\"data-cards\">\n {onSelect &&\n getIsItemSelected &&\n selectionMode === 'multiple' &&\n !hideSelectAll &&\n data.length > 0 && (\n <div className={styles.selectAllRow}>\n <Components.Checkbox\n value={allSelected}\n onChange={(checked: boolean) => onSelectAll?.(checked, data)}\n label={t('card.selectAllRowsLabel')}\n />\n </div>\n )}\n <div role=\"list\" aria-label={label}>\n {data.length === 0 && emptyState && (\n <div role=\"listitem\">\n <Components.Card className={isWithinBox ? styles.flushCard : undefined}>\n {emptyState()}\n </Components.Card>\n </div>\n )}\n {data.map((item, index) => (\n <div role=\"listitem\" key={index}>\n <Components.Card\n menu={itemMenu && itemMenu(item)}\n action={renderAction(item, index)}\n className={isWithinBox ? styles.flushCard : undefined}\n >\n {columns.map((column, colIndex) => (\n <Flex key={colIndex} flexDirection=\"column\" gap={0}>\n {column.title && <h5 className={styles.columnTitle}>{column.title}</h5>}\n <div className={styles.columnData}>\n {' '}\n {column.render ? column.render(item) : String(item[column.key as keyof T])}\n </div>\n </Flex>\n ))}\n </Components.Card>\n </div>\n ))}\n {footer && (\n <div role=\"listitem\">\n <Components.Card className={isWithinBox ? styles.flushCard : undefined}>\n {(() => {\n const footerContent = footer()\n\n return Object.entries(footerContent).map(([key, content]) => {\n const columnIndex = key.startsWith('column-')\n ? parseInt(key.replace('column-', ''), 10)\n : -1\n const columnTitle = columnIndex >= 0 ? columns[columnIndex]?.title : undefined\n\n return (\n <Flex key={key} flexDirection=\"column\" gap={0}>\n {columnTitle && <h5 className={styles.columnTitle}>{columnTitle}</h5>}\n <div className={styles.footerItem}>{content}</div>\n </Flex>\n )\n })\n })()}\n </Components.Card>\n </div>\n )}\n </div>\n </div>\n )\n}\n"],"names":["DataCards","label","data","columns","itemMenu","onSelect","onSelectAll","getIsItemSelected","hideSelectAll","emptyState","footer","selectionMode","isWithinBox","Components","useComponentContext","t","useTranslation","radioGroupName","useId","allSelected","useSelectionState","renderAction","item","index","isSelected","jsx","checked","jsxs","cn","styles","column","colIndex","Flex","footerContent","key","content","columnIndex","columnTitle"],"mappings":";;;;;;;;AAyBO,MAAMA,IAAY,CAAK;AAAA,EAC5B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,aAA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EAAQiC,CAAW,GAAG,QAAQ;AAErE,iBACE,gBAAAT,EAACK,GAAA,EAAe,eAAc,UAAS,KAAK,GACzC,UAAA;AAAA,YAAAK,KAAe,gBAAAZ,EAAC,MAAA,EAAG,WAAWI,EAAO,aAAc,UAAAQ,GAAY;AAAA,YAChE,gBAAAZ,EAAC,OAAA,EAAI,WAAWI,EAAO,YAAa,UAAAM,EAAA,CAAQ;AAAA,UAAA,EAAA,GAFnCD,CAGX;AAAA,QAEJ,CAAC;AAAA,MACH,GAAA,GACF,EAAA,CACF;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
@@ -8,9 +8,10 @@ export type DataTableProps<T> = {
8
8
  onSelect?: useDataViewPropReturn<T>['onSelect'];
9
9
  onSelectAll?: (checked: boolean, visibleData: T[]) => void;
10
10
  getIsItemSelected?: (item: T) => boolean;
11
+ hideSelectAll?: useDataViewPropReturn<T>['hideSelectAll'];
11
12
  emptyState?: useDataViewPropReturn<T>['emptyState'];
12
13
  footer?: useDataViewPropReturn<T>['footer'];
13
14
  isWithinBox?: TableProps['isWithinBox'];
14
15
  selectionMode?: SelectionMode;
15
16
  };
16
- export declare const DataTable: <T>({ label, data, columns, itemMenu, onSelect, onSelectAll, getIsItemSelected, emptyState, footer, isWithinBox, selectionMode, }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const DataTable: <T>({ label, data, columns, itemMenu, onSelect, onSelectAll, getIsItemSelected, hideSelectAll, emptyState, footer, isWithinBox, selectionMode, }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,43 +1,48 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { useId as P, useState as V } from "react";
3
- import { useTranslation as T } from "react-i18next";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useId as T, useState as j } from "react";
3
+ import { useTranslation as E } from "react-i18next";
4
4
  import { useSelectionState as F } from "../useSelectionState.js";
5
+ import N from "./DataTable.module.scss.js";
5
6
  import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
- import { VisuallyHidden as h } from "../../VisuallyHidden/VisuallyHidden.js";
7
- function j(c, n) {
8
- if (n.render)
9
- return n.render(c);
10
- if (n.key) {
11
- const s = n.key;
12
- return String(c[s] ?? "");
7
+ import { VisuallyHidden as k } from "../../VisuallyHidden/VisuallyHidden.js";
8
+ function C(a, o) {
9
+ return !o || o === "start" ? a : /* @__PURE__ */ r("div", { className: N.cellEnd, children: a });
10
+ }
11
+ function A(a, o) {
12
+ if (o.render)
13
+ return o.render(a);
14
+ if (o.key) {
15
+ const i = o.key;
16
+ return String(a[i] ?? "");
13
17
  }
14
18
  return "";
15
19
  }
16
- const B = ({
17
- label: c,
18
- data: n,
19
- columns: s,
20
- itemMenu: d,
21
- onSelect: r,
22
- onSelectAll: C,
23
- getIsItemSelected: u,
24
- emptyState: f,
25
- footer: b,
26
- isWithinBox: g,
27
- selectionMode: k = "multiple"
20
+ const U = ({
21
+ label: a,
22
+ data: o,
23
+ columns: i,
24
+ itemMenu: u,
25
+ onSelect: l,
26
+ onSelectAll: g,
27
+ getIsItemSelected: d,
28
+ hideSelectAll: R,
29
+ emptyState: p,
30
+ footer: h,
31
+ isWithinBox: m,
32
+ selectionMode: b = "multiple"
28
33
  }) => {
29
- const p = S(), { t: i } = T("common"), R = P(), [D, $] = V(null), { allSelected: m } = F(n, u), H = [
30
- ...r ? [
34
+ const y = S(), { t: c } = E("common"), D = T(), [$, v] = j(null), { allSelected: w } = F(o, d), H = [
35
+ ...l ? [
31
36
  {
32
37
  key: "select-header",
33
- content: k === "multiple" && u ? (
38
+ content: b === "multiple" && d && !R && o.length > 0 ? (
34
39
  // Stop propagation so the surrounding react-aria-components
35
40
  // <Column> press handler doesn't intercept the checkbox click
36
41
  // and desync the controlled DOM state. The inner <input> is
37
42
  // the actual interactive element; this span is a propagation
38
43
  // shield, not a click target itself.
39
44
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
40
- /* @__PURE__ */ a(
45
+ /* @__PURE__ */ r(
41
46
  "span",
42
47
  {
43
48
  onClick: (e) => {
@@ -49,115 +54,115 @@ const B = ({
49
54
  onMouseDown: (e) => {
50
55
  e.stopPropagation();
51
56
  },
52
- children: /* @__PURE__ */ a(
53
- p.Checkbox,
57
+ children: /* @__PURE__ */ r(
58
+ y.Checkbox,
54
59
  {
55
- value: m,
56
- onChange: (e) => C?.(e, n),
57
- label: i("table.selectAllRowsLabel"),
60
+ value: w,
61
+ onChange: (e) => g?.(e, o),
62
+ label: c("table.selectAllRowsLabel"),
58
63
  shouldVisuallyHideLabel: !0
59
64
  }
60
65
  )
61
66
  }
62
67
  )
63
- ) : /* @__PURE__ */ a(h, { children: i("table.selectRowHeader") })
68
+ ) : /* @__PURE__ */ r(k, { children: c("table.selectRowHeader") })
64
69
  }
65
70
  ] : [],
66
- ...s.map((e, t) => ({
71
+ ...i.map((e, t) => ({
67
72
  key: typeof e.key == "string" ? e.key : `header-${t}`,
68
- content: e.title
73
+ content: C(e.title, e.justify)
69
74
  })),
70
- ...d ? [
75
+ ...u ? [
71
76
  {
72
77
  key: "actions-header",
73
- content: /* @__PURE__ */ a(h, { children: i("table.actionsColumnHeader") })
78
+ content: /* @__PURE__ */ r(k, { children: c("table.actionsColumnHeader") })
74
79
  }
75
80
  ] : []
76
81
  ], L = (e, t) => {
77
- $(t), r?.(e, !0);
78
- }, v = (e, t) => {
79
- if (k === "single") {
80
- const o = u?.(e) ?? D === t;
81
- return /* @__PURE__ */ a(
82
- p.Radio,
82
+ v(t), l?.(e, !0);
83
+ }, x = (e, t) => {
84
+ if (b === "single") {
85
+ const n = d?.(e) ?? $ === t;
86
+ return /* @__PURE__ */ r(
87
+ y.Radio,
83
88
  {
84
- name: R,
85
- value: o,
89
+ name: D,
90
+ value: n,
86
91
  onChange: () => {
87
92
  L(e, t);
88
93
  },
89
- label: i("table.selectRowLabel"),
94
+ label: c("table.selectRowLabel"),
90
95
  shouldVisuallyHideLabel: !0
91
96
  }
92
97
  );
93
98
  }
94
- const l = u?.(e) ?? !1;
95
- return /* @__PURE__ */ a(
96
- p.Checkbox,
99
+ const s = d?.(e) ?? !1;
100
+ return /* @__PURE__ */ r(
101
+ y.Checkbox,
97
102
  {
98
- value: l,
99
- onChange: (o) => {
100
- r?.(e, o);
103
+ value: s,
104
+ onChange: (n) => {
105
+ l?.(e, n);
101
106
  },
102
- label: i("table.selectRowLabel"),
107
+ label: c("table.selectRowLabel"),
103
108
  shouldVisuallyHideLabel: !0
104
109
  }
105
110
  );
106
- }, w = n.map((e, t) => {
107
- const l = [
108
- ...r ? [
111
+ }, P = o.map((e, t) => {
112
+ const s = [
113
+ ...l ? [
109
114
  {
110
115
  key: `select-${t}`,
111
- content: v(e, t)
116
+ content: x(e, t)
112
117
  }
113
118
  ] : [],
114
- ...s.map((o, y) => ({
115
- key: typeof o.key == "string" ? o.key : `cell-${y}`,
116
- content: j(e, o)
119
+ ...i.map((n, f) => ({
120
+ key: typeof n.key == "string" ? n.key : `cell-${f}`,
121
+ content: C(A(e, n), n.justify)
117
122
  })),
118
- ...d ? [
123
+ ...u ? [
119
124
  {
120
125
  key: `menu-${t}`,
121
- content: d(e)
126
+ content: u(e)
122
127
  }
123
128
  ] : []
124
129
  ];
125
130
  return {
126
131
  key: `row-${t}`,
127
- data: l
132
+ data: s
128
133
  };
129
- }), x = (() => {
130
- if (!b) return;
131
- const e = b(), t = [];
132
- return r && t.push({
134
+ }), V = (() => {
135
+ if (!h) return;
136
+ const e = h(), t = [];
137
+ return l && t.push({
133
138
  key: "footer-select",
134
139
  content: ""
135
- }), s.forEach((l, o) => {
136
- const y = typeof l.key == "string" ? l.key : `column-${o}`;
140
+ }), i.forEach((s, n) => {
141
+ const f = typeof s.key == "string" ? s.key : `column-${n}`;
137
142
  t.push({
138
- key: `footer-${y}`,
139
- content: e[y] || ""
143
+ key: `footer-${f}`,
144
+ content: e[f] || ""
140
145
  });
141
- }), d && t.push({
146
+ }), u && t.push({
142
147
  key: "footer-actions",
143
148
  content: ""
144
149
  }), t;
145
150
  })();
146
- return /* @__PURE__ */ a(
147
- p.Table,
151
+ return /* @__PURE__ */ r(
152
+ y.Table,
148
153
  {
149
- "aria-label": c,
154
+ "aria-label": a,
150
155
  "data-testid": "data-table",
151
156
  headers: H,
152
- rows: w,
153
- footer: x,
154
- emptyState: f ? f() : void 0,
155
- isWithinBox: g,
156
- hasCheckboxColumn: !!r
157
+ rows: P,
158
+ footer: V,
159
+ emptyState: p ? p() : void 0,
160
+ isWithinBox: m,
161
+ hasCheckboxColumn: !!l
157
162
  }
158
163
  );
159
164
  };
160
165
  export {
161
- B as DataTable
166
+ U as DataTable
162
167
  };
163
168
  //# sourceMappingURL=DataTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.js","sources":["../../../../../src/components/Common/DataView/DataTable/DataTable.tsx"],"sourcesContent":["import { useId, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { useDataViewPropReturn, SelectionMode } from '../useDataView'\nimport { useSelectionState } from '../useSelectionState'\nimport type { TableData, TableRow, TableProps } from '../../UI/Table/TableTypes'\nimport { VisuallyHidden } from '../../VisuallyHidden'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataTableProps<T> = {\n label: string\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n onSelectAll?: (checked: boolean, visibleData: T[]) => void\n getIsItemSelected?: (item: T) => boolean\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n isWithinBox?: TableProps['isWithinBox']\n selectionMode?: SelectionMode\n}\n\nfunction getCellContent<T>(\n item: T,\n column: { key?: string | keyof T; render?: (item: T) => React.ReactNode },\n) {\n if (column.render) {\n return column.render(item)\n }\n\n if (column.key) {\n const key = column.key as keyof T\n return String(item[key] ?? '')\n }\n\n return ''\n}\n\nexport const DataTable = <T,>({\n label,\n data,\n columns,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n emptyState,\n footer,\n isWithinBox,\n selectionMode = 'multiple',\n}: DataTableProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const radioGroupName = useId()\n const [selectedRadioIndex, setSelectedRadioIndex] = useState<number | null>(null)\n const { allSelected } = useSelectionState(data, getIsItemSelected)\n\n const headers: TableData[] = [\n ...(onSelect\n ? [\n {\n key: 'select-header',\n content:\n selectionMode === 'multiple' && getIsItemSelected ? (\n // Stop propagation so the surrounding react-aria-components\n // <Column> press handler doesn't intercept the checkbox click\n // and desync the controlled DOM state. The inner <input> is\n // the actual interactive element; this span is a propagation\n // shield, not a click target itself.\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions\n <span\n onClick={e => {\n e.stopPropagation()\n }}\n onPointerDown={e => {\n e.stopPropagation()\n }}\n onMouseDown={e => {\n e.stopPropagation()\n }}\n >\n <Components.Checkbox\n value={allSelected}\n onChange={(checked: boolean) => onSelectAll?.(checked, data)}\n label={t('table.selectAllRowsLabel')}\n shouldVisuallyHideLabel\n />\n </span>\n ) : (\n <VisuallyHidden>{t('table.selectRowHeader')}</VisuallyHidden>\n ),\n },\n ]\n : []),\n ...columns.map((column, index) => ({\n key: typeof column.key === 'string' ? column.key : `header-${index}`,\n content: column.title,\n })),\n ...(itemMenu\n ? [\n {\n key: 'actions-header',\n content: <VisuallyHidden>{t('table.actionsColumnHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ]\n\n const handleRadioSelect = (item: T, rowIndex: number) => {\n setSelectedRadioIndex(rowIndex)\n onSelect?.(item, true)\n }\n\n const renderSelectionControl = (item: T, rowIndex: number) => {\n if (selectionMode === 'single') {\n const isSelected = getIsItemSelected?.(item) ?? selectedRadioIndex === rowIndex\n return (\n <Components.Radio\n name={radioGroupName}\n value={isSelected}\n onChange={() => {\n handleRadioSelect(item, rowIndex)\n }}\n label={t('table.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n const isSelected = getIsItemSelected?.(item) ?? false\n return (\n <Components.Checkbox\n value={isSelected}\n onChange={(checked: boolean) => {\n onSelect?.(item, checked)\n }}\n label={t('table.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n const rows: TableRow[] = data.map((item, rowIndex) => {\n const rowData: TableData[] = [\n ...(onSelect\n ? [\n {\n key: `select-${rowIndex}`,\n content: renderSelectionControl(item, rowIndex),\n },\n ]\n : []),\n ...columns.map((column, colIndex) => {\n return {\n key: typeof column.key === 'string' ? column.key : `cell-${colIndex}`,\n content: getCellContent(item, column),\n }\n }),\n ...(itemMenu\n ? [\n {\n key: `menu-${rowIndex}`,\n content: itemMenu(item),\n },\n ]\n : []),\n ]\n\n return {\n key: `row-${rowIndex}`,\n data: rowData,\n }\n })\n\n const buildFooterData = () => {\n if (!footer) return undefined\n\n const footerContent = footer()\n const footerCells: TableData[] = []\n\n // Add select column footer (empty)\n if (onSelect) {\n footerCells.push({\n key: 'footer-select',\n content: '',\n })\n }\n\n // Add data column footers\n columns.forEach((column, index) => {\n const columnKey = typeof column.key === 'string' ? column.key : `column-${index}`\n footerCells.push({\n key: `footer-${columnKey}`,\n content: footerContent[columnKey] || '',\n })\n })\n\n // Add actions column footer (empty)\n if (itemMenu) {\n footerCells.push({\n key: 'footer-actions',\n content: '',\n })\n }\n\n return footerCells\n }\n\n const footerData = buildFooterData()\n\n return (\n <Components.Table\n aria-label={label}\n data-testid=\"data-table\"\n headers={headers}\n rows={rows}\n footer={footerData}\n emptyState={emptyState ? emptyState() : undefined}\n isWithinBox={isWithinBox}\n hasCheckboxColumn={!!onSelect}\n />\n )\n}\n"],"names":["getCellContent","item","column","key","DataTable","label","data","columns","itemMenu","onSelect","onSelectAll","getIsItemSelected","emptyState","footer","isWithinBox","selectionMode","Components","useComponentContext","t","useTranslation","radioGroupName","useId","selectedRadioIndex","setSelectedRadioIndex","useState","allSelected","useSelectionState","headers","jsx","checked","VisuallyHidden","index","handleRadioSelect","rowIndex","renderSelectionControl","isSelected","rows","rowData","colIndex","footerData","footerContent","footerCells","columnKey"],"mappings":";;;;;;AAsBA,SAASA,EACPC,GACAC,GACA;AACA,MAAIA,EAAO;AACT,WAAOA,EAAO,OAAOD,CAAI;AAG3B,MAAIC,EAAO,KAAK;AACd,UAAMC,IAAMD,EAAO;AACnB,WAAO,OAAOD,EAAKE,CAAG,KAAK,EAAE;AAAA,EAC/B;AAEA,SAAO;AACT;AAEO,MAAMC,IAAY,CAAK;AAAA,EAC5B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC,IAAgB;AAClB,MAAyB;AACvB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAiBC,EAAA,GACjB,CAACC,GAAoBC,CAAqB,IAAIC,EAAwB,IAAI,GAC1E,EAAE,aAAAC,EAAA,IAAgBC,EAAkBpB,GAAMK,CAAiB,GAE3DgB,IAAuB;AAAA,IAC3B,GAAIlB,IACA;AAAA,MACE;AAAA,QACE,KAAK;AAAA,QACL,SACEM,MAAkB,cAAcJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAO9B,gBAAAiB;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAS,CAAA,MAAK;AACZ,kBAAE,gBAAA;AAAA,cACJ;AAAA,cACA,eAAe,CAAA,MAAK;AAClB,kBAAE,gBAAA;AAAA,cACJ;AAAA,cACA,aAAa,CAAA,MAAK;AAChB,kBAAE,gBAAA;AAAA,cACJ;AAAA,cAEA,UAAA,gBAAAA;AAAA,gBAACZ,EAAW;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KAAK;AAAA,MAAA,CACtC;AAAA,IACH,CAAC,GAGGlC,KACFiC,EAAY,KAAK;AAAA,MACf,KAAK;AAAA,MACL,SAAS;AAAA,IAAA,CACV,GAGIA;AAAA,EACT,GAEmB;AAEnB,SACE,gBAAAb;AAAA,IAACZ,EAAW;AAAA,IAAX;AAAA,MACC,cAAYX;AAAA,MACZ,eAAY;AAAA,MACZ,SAAAsB;AAAA,MACA,MAAAS;AAAA,MACA,QAAQG;AAAA,MACR,YAAY3B,IAAaA,EAAA,IAAe;AAAA,MACxC,aAAAE;AAAA,MACA,mBAAmB,CAAC,CAACL;AAAA,IAAA;AAAA,EAAA;AAG3B;"}
1
+ {"version":3,"file":"DataTable.js","sources":["../../../../../src/components/Common/DataView/DataTable/DataTable.tsx"],"sourcesContent":["import { useId, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { useDataViewPropReturn, SelectionMode } from '../useDataView'\nimport { useSelectionState } from '../useSelectionState'\nimport type { TableData, TableRow, TableProps } from '../../UI/Table/TableTypes'\nimport { VisuallyHidden } from '../../VisuallyHidden'\nimport styles from './DataTable.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nfunction withJustify(content: React.ReactNode, justify?: 'start' | 'end') {\n if (!justify || justify === 'start') return content\n return <div className={styles.cellEnd}>{content}</div>\n}\n\nexport type DataTableProps<T> = {\n label: string\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n onSelectAll?: (checked: boolean, visibleData: T[]) => void\n getIsItemSelected?: (item: T) => boolean\n hideSelectAll?: useDataViewPropReturn<T>['hideSelectAll']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n isWithinBox?: TableProps['isWithinBox']\n selectionMode?: SelectionMode\n}\n\nfunction getCellContent<T>(\n item: T,\n column: { key?: string | keyof T; render?: (item: T) => React.ReactNode },\n) {\n if (column.render) {\n return column.render(item)\n }\n\n if (column.key) {\n const key = column.key as keyof T\n return String(item[key] ?? '')\n }\n\n return ''\n}\n\nexport const DataTable = <T,>({\n label,\n data,\n columns,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n hideSelectAll,\n emptyState,\n footer,\n isWithinBox,\n selectionMode = 'multiple',\n}: DataTableProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const radioGroupName = useId()\n const [selectedRadioIndex, setSelectedRadioIndex] = useState<number | null>(null)\n const { allSelected } = useSelectionState(data, getIsItemSelected)\n\n const headers: TableData[] = [\n ...(onSelect\n ? [\n {\n key: 'select-header',\n content:\n selectionMode === 'multiple' &&\n getIsItemSelected &&\n !hideSelectAll &&\n data.length > 0 ? (\n // Stop propagation so the surrounding react-aria-components\n // <Column> press handler doesn't intercept the checkbox click\n // and desync the controlled DOM state. The inner <input> is\n // the actual interactive element; this span is a propagation\n // shield, not a click target itself.\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions\n <span\n onClick={e => {\n e.stopPropagation()\n }}\n onPointerDown={e => {\n e.stopPropagation()\n }}\n onMouseDown={e => {\n e.stopPropagation()\n }}\n >\n <Components.Checkbox\n value={allSelected}\n onChange={(checked: boolean) => onSelectAll?.(checked, data)}\n label={t('table.selectAllRowsLabel')}\n shouldVisuallyHideLabel\n />\n </span>\n ) : (\n <VisuallyHidden>{t('table.selectRowHeader')}</VisuallyHidden>\n ),\n },\n ]\n : []),\n ...columns.map((column, index) => ({\n key: typeof column.key === 'string' ? column.key : `header-${index}`,\n content: withJustify(column.title, column.justify),\n })),\n ...(itemMenu\n ? [\n {\n key: 'actions-header',\n content: <VisuallyHidden>{t('table.actionsColumnHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ]\n\n const handleRadioSelect = (item: T, rowIndex: number) => {\n setSelectedRadioIndex(rowIndex)\n onSelect?.(item, true)\n }\n\n const renderSelectionControl = (item: T, rowIndex: number) => {\n if (selectionMode === 'single') {\n const isSelected = getIsItemSelected?.(item) ?? selectedRadioIndex === rowIndex\n return (\n <Components.Radio\n name={radioGroupName}\n value={isSelected}\n onChange={() => {\n handleRadioSelect(item, rowIndex)\n }}\n label={t('table.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n const isSelected = getIsItemSelected?.(item) ?? false\n return (\n <Components.Checkbox\n value={isSelected}\n onChange={(checked: boolean) => {\n onSelect?.(item, checked)\n }}\n label={t('table.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n const rows: TableRow[] = data.map((item, rowIndex) => {\n const rowData: TableData[] = [\n ...(onSelect\n ? [\n {\n key: `select-${rowIndex}`,\n content: renderSelectionControl(item, rowIndex),\n },\n ]\n : []),\n ...columns.map((column, colIndex) => {\n return {\n key: typeof column.key === 'string' ? column.key : `cell-${colIndex}`,\n content: withJustify(getCellContent(item, column), column.justify),\n }\n }),\n ...(itemMenu\n ? [\n {\n key: `menu-${rowIndex}`,\n content: itemMenu(item),\n },\n ]\n : []),\n ]\n\n return {\n key: `row-${rowIndex}`,\n data: rowData,\n }\n })\n\n const buildFooterData = () => {\n if (!footer) return undefined\n\n const footerContent = footer()\n const footerCells: TableData[] = []\n\n // Add select column footer (empty)\n if (onSelect) {\n footerCells.push({\n key: 'footer-select',\n content: '',\n })\n }\n\n // Add data column footers\n columns.forEach((column, index) => {\n const columnKey = typeof column.key === 'string' ? column.key : `column-${index}`\n footerCells.push({\n key: `footer-${columnKey}`,\n content: footerContent[columnKey] || '',\n })\n })\n\n // Add actions column footer (empty)\n if (itemMenu) {\n footerCells.push({\n key: 'footer-actions',\n content: '',\n })\n }\n\n return footerCells\n }\n\n const footerData = buildFooterData()\n\n return (\n <Components.Table\n aria-label={label}\n data-testid=\"data-table\"\n headers={headers}\n rows={rows}\n footer={footerData}\n emptyState={emptyState ? emptyState() : undefined}\n isWithinBox={isWithinBox}\n hasCheckboxColumn={!!onSelect}\n />\n )\n}\n"],"names":["withJustify","content","justify","jsx","styles","getCellContent","item","column","key","DataTable","label","data","columns","itemMenu","onSelect","onSelectAll","getIsItemSelected","hideSelectAll","emptyState","footer","isWithinBox","selectionMode","Components","useComponentContext","t","useTranslation","radioGroupName","useId","selectedRadioIndex","setSelectedRadioIndex","useState","allSelected","useSelectionState","headers","checked","VisuallyHidden","index","handleRadioSelect","rowIndex","renderSelectionControl","isSelected","rows","rowData","colIndex","footerData","footerContent","footerCells","columnKey"],"mappings":";;;;;;;AASA,SAASA,EAAYC,GAA0BC,GAA2B;AACxE,SAAI,CAACA,KAAWA,MAAY,UAAgBD,IACrC,gBAAAE,EAAC,OAAA,EAAI,WAAWC,EAAO,SAAU,UAAAH,GAAQ;AAClD;AAiBA,SAASI,EACPC,GACAC,GACA;AACA,MAAIA,EAAO;AACT,WAAOA,EAAO,OAAOD,CAAI;AAG3B,MAAIC,EAAO,KAAK;AACd,UAAMC,IAAMD,EAAO;AACnB,WAAO,OAAOD,EAAKE,CAAG,KAAK,EAAE;AAAA,EAC/B;AAEA,SAAO;AACT;AAEO,MAAMC,IAAY,CAAK;AAAA,EAC5B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC,IAAgB;AAClB,MAAyB;AACvB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAiBC,EAAA,GACjB,CAACC,GAAoBC,CAAqB,IAAIC,EAAwB,IAAI,GAC1E,EAAE,aAAAC,EAAA,IAAgBC,EAAkBrB,GAAMK,CAAiB,GAE3DiB,IAAuB;AAAA,IAC3B,GAAInB,IACA;AAAA,MACE;AAAA,QACE,KAAK;AAAA,QACL,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;AAAA,EAEV,CAAC,GAoCKE,KAlCkB,MAAM;AAC5B,QAAI,CAACzB,EAAQ;AAEb,UAAM0B,IAAgB1B,EAAA,GAChB2B,IAA2B,CAAA;AAGjC,WAAIhC,KACFgC,EAAY,KAAK;AAAA,MACf,KAAK;AAAA,MACL,SAAS;AAAA,IAAA,CACV,GAIHlC,EAAQ,QAAQ,CAACL,GAAQ6B,MAAU;AACjC,YAAMW,IAAY,OAAOxC,EAAO,OAAQ,WAAWA,EAAO,MAAM,UAAU6B,CAAK;AAC/E,MAAAU,EAAY,KAAK;AAAA,QACf,KAAK,UAAUC,CAAS;AAAA,QACxB,SAASF,EAAcE,CAAS,KAAK;AAAA,MAAA,CACtC;AAAA,IACH,CAAC,GAGGlC,KACFiC,EAAY,KAAK;AAAA,MACf,KAAK;AAAA,MACL,SAAS;AAAA,IAAA,CACV,GAGIA;AAAA,EACT,GAEmB;AAEnB,SACE,gBAAA3C;AAAA,IAACmB,EAAW;AAAA,IAAX;AAAA,MACC,cAAYZ;AAAA,MACZ,eAAY;AAAA,MACZ,SAAAuB;AAAA,MACA,MAAAQ;AAAA,MACA,QAAQG;AAAA,MACR,YAAY1B,IAAaA,EAAA,IAAe;AAAA,MACxC,aAAAE;AAAA,MACA,mBAAmB,CAAC,CAACN;AAAA,IAAA;AAAA,EAAA;AAG3B;"}
@@ -0,0 +1,8 @@
1
+ const l = "_cellEnd_oem7d_1", e = {
2
+ cellEnd: l
3
+ };
4
+ export {
5
+ l as cellEnd,
6
+ e as default
7
+ };
8
+ //# sourceMappingURL=DataTable.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTable.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}