@gusto/embedded-react-sdk 0.38.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (696) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/dist/UNSTABLE_Hooks.d.ts +1 -1
  3. package/dist/UNSTABLE_Hooks.js +64 -46
  4. package/dist/UNSTABLE_Hooks.js.map +1 -1
  5. package/dist/assets/icons/percent-circle.svg.js +10 -0
  6. package/dist/assets/icons/percent-circle.svg.js.map +1 -0
  7. package/dist/assets/icons/plus-circle.svg.js +1 -1
  8. package/dist/assets/icons/plus-circle.svg.js.map +1 -1
  9. package/dist/components/Base/Base.js +2 -3
  10. package/dist/components/Base/Base.js.map +1 -1
  11. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +5 -3
  12. package/dist/components/Common/DataView/DataCards/DataCards.js +59 -46
  13. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  14. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +9 -7
  15. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  16. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +4 -2
  17. package/dist/components/Common/DataView/DataTable/DataTable.js +95 -76
  18. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  19. package/dist/components/Common/DataView/DataView.d.ts +4 -3
  20. package/dist/components/Common/DataView/DataView.js +24 -22
  21. package/dist/components/Common/DataView/DataView.js.map +1 -1
  22. package/dist/components/Common/DataView/useDataView.d.ts +33 -6
  23. package/dist/components/Common/DataView/useDataView.js +23 -20
  24. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  25. package/dist/components/Common/DataView/useSelectionState.d.ts +5 -0
  26. package/dist/components/Common/DataView/useSelectionState.js +8 -0
  27. package/dist/components/Common/DataView/useSelectionState.js.map +1 -0
  28. package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +3 -1
  29. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +65 -71
  30. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
  31. package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +10 -6
  32. package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -1
  33. package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
  34. package/dist/components/Common/EmptyData/EmptyData.js +15 -13
  35. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  36. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
  37. package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
  38. package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.d.ts +2 -2
  39. package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js +2 -2
  40. package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js.map +1 -1
  41. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
  42. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  43. package/dist/components/Common/SignatureForm/SignatureFormActions.js +5 -6
  44. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  45. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -7
  46. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  47. package/dist/components/Common/UI/Box/Box.d.ts +1 -1
  48. package/dist/components/Common/UI/Box/Box.js +9 -8
  49. package/dist/components/Common/UI/Box/Box.js.map +1 -1
  50. package/dist/components/Common/UI/Box/Box.module.scss.js +12 -8
  51. package/dist/components/Common/UI/Box/Box.module.scss.js.map +1 -1
  52. package/dist/components/Common/UI/Box/BoxTypes.d.ts +2 -9
  53. package/dist/components/Common/UI/BoxHeader/BoxHeader.d.ts +2 -0
  54. package/dist/components/Common/UI/BoxHeader/BoxHeader.js +23 -0
  55. package/dist/components/Common/UI/BoxHeader/BoxHeader.js.map +1 -0
  56. package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js +8 -0
  57. package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js.map +1 -0
  58. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +10 -0
  59. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js +7 -0
  60. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -0
  61. package/dist/components/Common/UI/BoxHeader/index.d.ts +2 -0
  62. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  63. package/dist/components/Common/UI/Button/Button.module.scss.js +2 -2
  64. package/dist/components/Common/UI/Checkbox/Checkbox.js +60 -49
  65. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  66. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +10 -6
  67. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js.map +1 -1
  68. package/dist/components/Common/UI/ComboBox/ComboBox.js +1 -1
  69. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  70. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +1 -1
  71. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +6 -6
  72. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +34 -36
  73. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -1
  74. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +12 -12
  75. package/dist/components/Common/UI/DescriptionList/DescriptionList.js +19 -12
  76. package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
  77. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +6 -4
  78. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -1
  79. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +6 -1
  80. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +4 -1
  81. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
  82. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  83. package/dist/components/Common/UI/Heading/Heading.module.scss.js +15 -15
  84. package/dist/components/Common/UI/Input/Input.js.map +1 -1
  85. package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
  86. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  87. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +1 -1
  88. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  89. package/dist/components/Common/UI/Select/Select.js +22 -22
  90. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  91. package/dist/components/Common/UI/Select/SelectTypes.d.ts +1 -1
  92. package/dist/components/Common/UI/Table/Table.js +12 -12
  93. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  94. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  95. package/dist/components/Common/UI/Table/TableTypes.d.ts +3 -3
  96. package/dist/components/Common/UI/Table/TableTypes.js +3 -3
  97. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  98. package/dist/components/Common/UI/TextArea/TextArea.js +1 -1
  99. package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -1
  100. package/dist/components/Common/UI/TextInput/TextInput.js +13 -13
  101. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  102. package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
  103. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  104. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
  105. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  106. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
  107. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  108. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +1 -1
  109. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
  110. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  111. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
  112. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  113. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  114. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
  115. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  116. package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -3
  117. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  118. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
  119. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  120. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  121. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  122. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  123. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  124. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
  125. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  126. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +8 -9
  127. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  128. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  129. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  130. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  131. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  132. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
  133. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  134. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -9
  135. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  136. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
  137. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  138. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
  139. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  140. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
  141. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  142. package/dist/components/Company/FederalTaxes/Actions.js +5 -6
  143. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  144. package/dist/components/Company/FederalTaxes/FederalTaxes.js +17 -18
  145. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  146. package/dist/components/Company/FederalTaxes/Form.js +4 -6
  147. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  148. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
  149. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  150. package/dist/components/Company/Industry/Actions.js +2 -3
  151. package/dist/components/Company/Industry/Actions.js.map +1 -1
  152. package/dist/components/Company/Industry/Context.js +6 -8
  153. package/dist/components/Company/Industry/Context.js.map +1 -1
  154. package/dist/components/Company/Industry/Edit.js +4 -5
  155. package/dist/components/Company/Industry/Edit.js.map +1 -1
  156. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  157. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  158. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  159. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
  160. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  161. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
  162. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  163. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -7
  164. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  165. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  166. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  167. package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -3
  168. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  169. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
  170. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  171. package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
  172. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  173. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +5 -7
  174. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  175. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
  176. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  177. package/dist/components/Company/OnboardingOverview/context.js +3 -5
  178. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  179. package/dist/components/Company/PaySchedule/PaySchedule.js +70 -68
  180. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  181. package/dist/components/Company/PaySchedule/_parts/Actions.js +7 -8
  182. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  183. package/dist/components/Company/PaySchedule/_parts/Edit.js +40 -35
  184. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  185. package/dist/components/Company/PaySchedule/_parts/Head.js +8 -10
  186. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  187. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  188. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  189. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +5 -6
  190. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -7
  191. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  192. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  193. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  194. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +33 -33
  195. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  196. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
  197. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  198. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
  199. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  200. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  201. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  202. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +14 -14
  203. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  204. package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +2 -2
  205. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
  206. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  207. package/dist/components/Contractor/Address/Address.js +3 -4
  208. package/dist/components/Contractor/Address/Address.js.map +1 -1
  209. package/dist/components/Contractor/Address/useAddress.js +5 -7
  210. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  211. package/dist/components/Contractor/ContractorList/index.js +19 -20
  212. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  213. package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
  214. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  215. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -6
  216. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  217. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  218. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  219. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  220. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  221. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +135 -126
  222. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  223. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
  224. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +77 -76
  225. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  226. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  227. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
  228. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +5 -7
  229. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  230. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
  231. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +83 -84
  232. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  233. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -4
  234. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  235. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +10 -10
  236. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  237. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +67 -79
  238. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  239. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +10 -12
  240. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -1
  241. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +47 -49
  242. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  243. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +63 -65
  244. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  245. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +4 -4
  246. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  247. package/dist/components/Contractor/Profile/useContractorProfile.js +33 -35
  248. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  249. package/dist/components/Contractor/Submit/Submit.js +7 -8
  250. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  251. package/dist/components/Employee/Compensation/Actions.js +4 -5
  252. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  253. package/dist/components/Employee/Compensation/Compensation.js +80 -77
  254. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  255. package/dist/components/Employee/Compensation/Edit.js +27 -28
  256. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  257. package/dist/components/Employee/Compensation/List.js +22 -23
  258. package/dist/components/Employee/Compensation/List.js.map +1 -1
  259. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
  260. package/dist/components/Employee/Dashboard/BasicDetailsView.js +107 -0
  261. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -0
  262. package/dist/components/Employee/Dashboard/Dashboard.d.ts +5 -0
  263. package/dist/components/Employee/Dashboard/Dashboard.js +146 -0
  264. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -0
  265. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +5 -0
  266. package/dist/components/Employee/Dashboard/DashboardComponents.js +12 -0
  267. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -0
  268. package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +5 -0
  269. package/dist/components/Employee/Dashboard/DashboardFlow.js +25 -0
  270. package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -0
  271. package/dist/components/Employee/Dashboard/DocumentsView.d.ts +7 -0
  272. package/dist/components/Employee/Dashboard/DocumentsView.js +51 -0
  273. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -0
  274. package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +22 -0
  275. package/dist/components/Employee/Dashboard/JobAndPayView.js +211 -0
  276. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -0
  277. package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
  278. package/dist/components/Employee/Dashboard/TaxesView.js +97 -0
  279. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -0
  280. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
  281. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +8 -0
  282. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -0
  283. package/dist/components/Employee/Dashboard/hooks/index.d.ts +9 -0
  284. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +20 -0
  285. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +29 -0
  286. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -0
  287. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +30 -0
  288. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +52 -0
  289. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -0
  290. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +16 -0
  291. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +22 -0
  292. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -0
  293. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +20 -0
  294. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +24 -0
  295. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -0
  296. package/dist/components/Employee/Dashboard/index.d.ts +14 -0
  297. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -12
  298. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  299. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +17 -19
  300. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  301. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -13
  302. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  303. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -8
  304. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  305. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -7
  306. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  307. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +5 -6
  308. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  309. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  310. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  311. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -5
  312. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  313. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +22 -22
  314. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  315. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
  316. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  317. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +11 -12
  318. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  319. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
  320. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  321. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
  322. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  323. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +2 -4
  324. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  325. package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +2 -3
  326. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  327. package/dist/components/Employee/EmployeeList/EmployeeListView.js +40 -42
  328. package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +1 -1
  329. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js +7 -9
  330. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +1 -1
  331. package/dist/components/Employee/FederalTaxes/Actions.js +6 -7
  332. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  333. package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -11
  334. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  335. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -5
  336. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  337. package/dist/components/Employee/Landing/Landing.js +14 -15
  338. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  339. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  340. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  341. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  342. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
  343. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  344. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  345. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  346. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
  347. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  348. package/dist/components/Employee/PaymentMethod/Split.js +10 -11
  349. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  350. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -7
  351. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  352. package/dist/components/Employee/Profile/Actions.js +6 -7
  353. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  354. package/dist/components/Employee/Profile/AdminPersonalDetails.js +4 -5
  355. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  356. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  357. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +1 -1
  358. package/dist/components/Employee/Profile/useProfile.js +3 -5
  359. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  360. package/dist/components/Employee/StateTaxes/Actions.js +7 -8
  361. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  362. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -5
  363. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  364. package/dist/components/Employee/Taxes/Actions.js +8 -9
  365. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  366. package/dist/components/Employee/Taxes/FederalForm.js +10 -11
  367. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  368. package/dist/components/Employee/Taxes/useTaxes.js +3 -5
  369. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  370. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -16
  371. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  372. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +12 -13
  373. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  374. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +2 -4
  375. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  376. package/dist/components/Employee/index.d.ts +2 -0
  377. package/dist/components/Employee/index.js +28 -26
  378. package/dist/components/Employee/index.js.map +1 -1
  379. package/dist/components/Flow/Flow.js +16 -18
  380. package/dist/components/Flow/Flow.js.map +1 -1
  381. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +28 -29
  382. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  383. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +14 -14
  384. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +11 -12
  385. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  386. package/dist/components/InformationRequests/InformationRequests.js +3 -4
  387. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  388. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -11
  389. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  390. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -10
  391. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  392. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +12 -14
  393. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  394. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +74 -69
  395. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  396. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
  397. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  398. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +0 -1
  399. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  400. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
  401. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +19 -19
  402. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
  403. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
  404. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
  405. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
  406. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -7
  407. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  408. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -13
  409. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  410. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -13
  411. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  412. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  413. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
  414. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  415. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -2
  416. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +16 -16
  417. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  418. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
  419. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +28 -28
  420. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  421. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +22 -24
  422. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  423. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +78 -79
  424. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  425. package/dist/components/Payroll/PayrollList/PayrollList.js +1 -1
  426. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  427. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -2
  428. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +224 -201
  429. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  430. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +8 -8
  431. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +79 -80
  432. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  433. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  434. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +18 -18
  435. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  436. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
  437. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
  438. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  439. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +103 -114
  440. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  441. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +16 -18
  442. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -1
  443. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -3
  444. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  445. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -7
  446. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  447. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -4
  448. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  449. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
  450. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  451. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +8 -10
  452. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  453. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
  454. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
  455. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
  456. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +13 -13
  457. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  458. package/dist/components/Payroll/helpers.d.ts +1 -1
  459. package/dist/components/Payroll/helpers.js.map +1 -1
  460. package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
  461. package/dist/components/Payroll/usePreparedPayrollData.js +7 -9
  462. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  463. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +3 -3
  464. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.d.ts +48 -0
  465. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js +94 -0
  466. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +1 -0
  467. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +9 -10
  468. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
  469. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +10 -11
  470. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
  471. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +9 -10
  472. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
  473. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +12 -13
  474. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
  475. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +13 -14
  476. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
  477. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +3 -3
  478. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +14 -15
  479. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
  480. package/dist/components/UNSTABLE_Hooks/form/index.d.ts +2 -4
  481. package/dist/components/UNSTABLE_Hooks/form/preprocessors.d.ts +3 -0
  482. package/dist/components/UNSTABLE_Hooks/form/preprocessors.js +15 -0
  483. package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +1 -0
  484. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +1 -1
  485. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +8 -7
  486. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -1
  487. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.d.ts +17 -0
  488. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +21 -0
  489. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +1 -0
  490. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +7 -7
  491. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
  492. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +1 -1
  493. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -1
  494. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +3 -4
  495. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -1
  496. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +48 -42
  497. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +73 -101
  498. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
  499. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchemaParity.test.d.ts +1 -0
  500. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +1 -1
  501. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -1
  502. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +2 -2
  503. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +4 -6
  504. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +111 -112
  505. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
  506. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +3 -4
  507. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -1
  508. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
  509. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +31 -25
  510. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
  511. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +4 -3
  512. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -1
  513. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +1 -1
  514. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +5 -19
  515. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +83 -86
  516. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
  517. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.d.ts +5 -0
  518. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js +172 -0
  519. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js.map +1 -0
  520. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js +14 -0
  521. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js.map +1 -0
  522. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.d.ts +23 -0
  523. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js +37 -0
  524. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js.map +1 -0
  525. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/index.d.ts +7 -0
  526. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.d.ts +55 -0
  527. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js +54 -0
  528. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js.map +1 -0
  529. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.d.ts +69 -0
  530. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js +180 -0
  531. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
  532. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.d.ts +5 -0
  533. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js +69 -0
  534. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js.map +1 -0
  535. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.d.ts +9 -0
  536. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js +14 -0
  537. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js.map +1 -0
  538. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/index.d.ts +7 -0
  539. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.d.ts +25 -0
  540. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js +24 -0
  541. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
  542. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.d.ts +57 -0
  543. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js +101 -0
  544. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
  545. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.d.ts +5 -0
  546. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js +71 -0
  547. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js.map +1 -0
  548. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.d.ts +5 -0
  549. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js +179 -0
  550. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js.map +1 -0
  551. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.d.ts +53 -0
  552. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js +164 -0
  553. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js.map +1 -0
  554. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/index.d.ts +9 -0
  555. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.d.ts +150 -0
  556. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js +152 -0
  557. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  558. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.d.ts +151 -0
  559. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js +172 -0
  560. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  561. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +6 -7
  562. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -1
  563. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +1 -1
  564. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +4 -5
  565. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +85 -83
  566. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  567. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +8 -4
  568. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +18 -17
  569. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -1
  570. package/dist/components/UNSTABLE_Hooks/index.d.ts +7 -4
  571. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +45 -42
  572. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  573. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +2 -0
  574. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +55 -0
  575. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
  576. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +25 -0
  577. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +1 -1
  578. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +69 -46
  579. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -1
  580. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
  581. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +122 -0
  582. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
  583. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
  584. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
  585. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
  586. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +3 -1
  587. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +25 -55
  588. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
  589. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +2 -0
  590. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +66 -0
  591. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
  592. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +6 -0
  593. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
  594. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +71 -66
  595. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  596. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +5 -5
  597. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  598. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +8 -0
  599. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +71 -0
  600. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
  601. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +12 -0
  602. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +1 -0
  603. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +2 -0
  604. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +206 -0
  605. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
  606. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +20 -0
  607. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +6 -0
  608. package/dist/components/UNSTABLE_TimeOff/index.d.ts +2 -2
  609. package/dist/components/UNSTABLE_TimeOff/index.js +20 -20
  610. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
  611. package/dist/components/UNSTABLE_TimeOff/{TimeOffManagement/shared → shared}/EmployeeTable/EmployeeTableTypes.d.ts +3 -3
  612. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.d.ts +30 -0
  613. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js +97 -0
  614. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +1 -0
  615. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts +1 -0
  616. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +52 -50
  617. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  618. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  619. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +10 -0
  620. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +28 -21
  621. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  622. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  623. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  624. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -11
  625. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  626. package/dist/contexts/ThemeProvider/theme.d.ts +2 -0
  627. package/dist/contexts/ThemeProvider/theme.js +4 -2
  628. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  629. package/dist/helpers/buildQueryErrorHandling.d.ts +22 -0
  630. package/dist/helpers/buildQueryErrorHandling.js +11 -0
  631. package/dist/helpers/buildQueryErrorHandling.js.map +1 -0
  632. package/dist/helpers/dateFormatting.d.ts +2 -0
  633. package/dist/helpers/dateFormatting.js +38 -33
  634. package/dist/helpers/dateFormatting.js.map +1 -1
  635. package/dist/helpers/formattedStrings.js +40 -33
  636. package/dist/helpers/formattedStrings.js.map +1 -1
  637. package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
  638. package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
  639. package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
  640. package/dist/hooks/useCompanyPaymentSpeed.test.d.ts +1 -0
  641. package/dist/i18n/I18n.js +9 -9
  642. package/dist/i18n/I18n.js.map +1 -1
  643. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +9 -9
  644. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +18 -12
  645. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -1
  646. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
  647. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
  648. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +32 -26
  649. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
  650. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -34
  651. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  652. package/dist/i18n/en/Employee.Dashboard.json.js +26 -0
  653. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -0
  654. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
  655. package/dist/i18n/en/Payroll.PayrollHistory.json.js +2 -2
  656. package/dist/i18n/en/Payroll.PayrollList.json.js +15 -15
  657. package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
  658. package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js +24 -0
  659. package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js.map +1 -0
  660. package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js +20 -0
  661. package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js.map +1 -0
  662. package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js +22 -0
  663. package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js.map +1 -0
  664. package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js +70 -0
  665. package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js.map +1 -0
  666. package/dist/i18n/en/common.json.d.ts +3 -1
  667. package/dist/i18n/en/common.json.js +5 -5
  668. package/dist/shared/constants.d.ts +10 -0
  669. package/dist/shared/constants.js +15 -10
  670. package/dist/shared/constants.js.map +1 -1
  671. package/dist/style.css +1 -1
  672. package/dist/types/i18next.d.ts +348 -29
  673. package/dist/types/sdkHooks.d.ts +2 -4
  674. package/docs/reference/endpoint-inventory.json +119 -29
  675. package/package.json +19 -19
  676. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +0 -26
  677. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
  678. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
  679. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +0 -3
  680. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +0 -14
  681. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +0 -1
  682. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +0 -6
  683. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
  684. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
  685. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
  686. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -8
  687. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
  688. package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.d.ts +0 -6
  689. package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js +0 -50
  690. package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js.map +0 -1
  691. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTable.d.ts +0 -2
  692. package/dist/helpers/requiredIf.d.ts +0 -13
  693. package/dist/helpers/requiredIf.js +0 -8
  694. package/dist/helpers/requiredIf.js.map +0 -1
  695. /package/dist/components/UNSTABLE_Hooks/form/{deriveFieldsMetadata.test.d.ts → buildFormSchema.test.d.ts} +0 -0
  696. /package/dist/components/UNSTABLE_TimeOff/{TimeOffManagement/shared → shared}/EmployeeTable/index.d.ts +0 -0
@@ -1,19 +1,17 @@
1
- import { jsx as e, jsxs as s, Fragment as o } from "react/jsx-runtime";
2
- import { useTranslation as c, Trans as a } from "react-i18next";
1
+ import { jsx as e, jsxs as s, Fragment as a } from "react/jsx-runtime";
2
+ import { useTranslation as c, Trans as o } from "react-i18next";
3
3
  import { usePaySchedule as d } from "../usePaySchedule.js";
4
4
  import { Flex as h } from "../../../Common/Flex/Flex.js";
5
- import "classnames";
6
- import "../../../../shared/constants.js";
7
5
  import { useComponentContext as l } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- const L = () => {
6
+ const y = () => {
9
7
  const { t: i } = c("Company.PaySchedule"), n = l(), { mode: r } = d();
10
- let t = /* @__PURE__ */ e(o, {});
8
+ let t = /* @__PURE__ */ e(a, {});
11
9
  switch (r) {
12
10
  case "LIST_PAY_SCHEDULES":
13
- t = /* @__PURE__ */ s(o, { children: [
11
+ t = /* @__PURE__ */ s(a, { children: [
14
12
  /* @__PURE__ */ e(n.Heading, { as: "h2", children: i("headings.pageTitle") }),
15
13
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
16
- a,
14
+ o,
17
15
  {
18
16
  i18nKey: "listDescription",
19
17
  t: i,
@@ -23,7 +21,7 @@ const L = () => {
23
21
  }
24
22
  ) }),
25
23
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
26
- a,
24
+ o,
27
25
  {
28
26
  i18nKey: "listDescription2",
29
27
  t: i,
@@ -44,6 +42,6 @@ const L = () => {
44
42
  return /* @__PURE__ */ e(h, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ e("header", { children: t }) });
45
43
  };
46
44
  export {
47
- L as Head
45
+ y as Head
48
46
  };
49
47
  //# sourceMappingURL=Head.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n ScheduleLink: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n PaymentLawLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAAC,EAAA,IAASC,EAAA;AACjB,MAAIC,IAAoC,gBAAAC,EAAAC,GAAA,EAAE;AAE1C,UAAQJ,GAAA;AAAA,IACN,KAAK;AACH,MAAAE,IACE,gBAAAG,EAAAD,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAD,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,oBAAoB,GAAE;AAAA,QACrD,gBAAAO,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,cAAc,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACjC;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,gBAAgB,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACnC;AAAA,QAAA,EACF,CACF;AAAA,MAAA,GACF;AAEF;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,yBAAyB,GAAE;AAE5D;AAAA,IACF,KAAK;AACH,MAAAM,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,0BAA0B,GAAE;AAE7D;AAAA,EACF;AAGF,SACE,gBAAAO,EAACI,GAAA,EAAK,gBAAe,iBAAgB,eAAe,UAAU,KAAK,GACjE,UAAA,gBAAAJ,EAAC,UAAA,EAAQ,UAAAD,EAAA,CAAc,GACzB;AAEJ;"}
1
+ {"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n ScheduleLink: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n PaymentLawLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAAC,EAAA,IAASC,EAAA;AACjB,MAAIC,IAAoC,gBAAAC,EAAAC,GAAA,EAAE;AAE1C,UAAQJ,GAAA;AAAA,IACN,KAAK;AACH,MAAAE,IACE,gBAAAG,EAAAD,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAD,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,oBAAoB,GAAE;AAAA,QACrD,gBAAAO,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,cAAc,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACjC;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,gBAAgB,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACnC;AAAA,QAAA,EACF,CACF;AAAA,MAAA,GACF;AAEF;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,yBAAyB,GAAE;AAE5D;AAAA,IACF,KAAK;AACH,MAAAM,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,0BAA0B,GAAE;AAE7D;AAAA,EACF;AAGF,SACE,gBAAAO,EAACI,GAAA,EAAK,gBAAe,iBAAgB,eAAe,UAAU,KAAK,GACjE,UAAA,gBAAAJ,EAAC,UAAA,EAAQ,UAAAD,EAAA,CAAc,GACzB;AAEJ;"}
@@ -1,38 +1,36 @@
1
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
2
  import { useTranslation as h } from "react-i18next";
3
3
  import { usePaySchedule as y } from "../usePaySchedule.js";
4
4
  import o from "./List.module.scss.js";
5
5
  import { Flex as s } from "../../../Common/Flex/Flex.js";
6
- import "classnames";
7
- import "../../../../shared/constants.js";
8
6
  import f from "../../../../assets/icons/pencil.svg.js";
9
7
  import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
8
  import { VisuallyHidden as v } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
9
  import { HamburgerMenu as g } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
12
10
  import { useDataView as L } from "../../../Common/DataView/useDataView.js";
13
11
  import { DataView as C } from "../../../Common/DataView/DataView.js";
14
- const F = () => {
15
- const { t: r } = h("Company.PaySchedule"), n = S(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
16
- data: m || [],
12
+ const H = () => {
13
+ const { t: n } = h("Company.PaySchedule"), r = S(), { paySchedules: c, mode: m, handleEdit: l } = y(), { ...d } = L({
14
+ data: c || [],
17
15
  columns: [
18
16
  {
19
- title: r("payScheduleList.name"),
17
+ title: n("payScheduleList.name"),
20
18
  key: "customName",
21
19
  render: (t) => {
22
20
  const a = !!t.name;
23
21
  let i = a ? t.name : t.customName;
24
22
  i && i.length > 1 ? i = i.charAt(0).toUpperCase() + i.slice(1) : i = t.customName;
25
- const p = t.customName;
26
- return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ u("div", { className: o.content, children: [
23
+ const u = t.customName;
24
+ return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ p("div", { className: o.content, children: [
27
25
  /* @__PURE__ */ e("div", { children: i }),
28
- a && /* @__PURE__ */ e("div", { children: p })
26
+ a && /* @__PURE__ */ e("div", { children: u })
29
27
  ] }) });
30
28
  }
31
29
  },
32
30
  {
33
- title: /* @__PURE__ */ e(v, { children: r("payScheduleList.active") }),
31
+ title: /* @__PURE__ */ e(v, { children: n("payScheduleList.active") }),
34
32
  key: "active",
35
- render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(n.Badge, { status: "success", children: r("payScheduleList.active") }) : /* @__PURE__ */ e(n.Badge, { status: "info", children: r("payScheduleList.inactive") }) }) })
33
+ render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(r.Badge, { status: "success", children: n("payScheduleList.active") }) : /* @__PURE__ */ e(r.Badge, { status: "info", children: n("payScheduleList.inactive") }) }) })
36
34
  }
37
35
  ],
38
36
  itemMenu: (t) => /* @__PURE__ */ e(
@@ -41,7 +39,7 @@ const F = () => {
41
39
  triggerLabel: "Actions",
42
40
  items: [
43
41
  {
44
- label: r("payScheduleList.edit"),
42
+ label: n("payScheduleList.edit"),
45
43
  onClick: () => {
46
44
  l(t);
47
45
  },
@@ -51,9 +49,9 @@ const F = () => {
51
49
  }
52
50
  )
53
51
  });
54
- return c !== "LIST_PAY_SCHEDULES" ? null : /* @__PURE__ */ e(C, { label: "test", ...d });
52
+ return m !== "LIST_PAY_SCHEDULES" ? null : /* @__PURE__ */ e(C, { label: "test", ...d });
55
53
  };
56
54
  export {
57
- F as List
55
+ H as List
58
56
  };
59
57
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":";;;;;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,MAAAC,GAAM,YAAAC,EAAA,IAAeC,EAAA,GAErC,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAML,KAAgB,CAAA;AAAA,IACtB,SAAS;AAAA,MACP;AAAA,QACE,OAAOJ,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAU,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,EAAS,OAAOA,EAAS;AACrD,UAAIE,KAAeA,EAAY,SAAS,IACtCA,IAAcA,EAAY,OAAO,CAAC,EAAE,gBAAgBA,EAAY,MAAM,CAAC,IAEvEA,IAAcF,EAAS;AAEzB,gBAAMG,IAAmBH,EAAS;AAClC,iBACE,gBAAAI,EAACC,GAAA,EAAK,eAAe,UAAU,KAAK,GAClC,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,SACrB,UAAA;AAAA,YAAA,gBAAAH,EAAC,SAAK,UAAAF,EAAA,CAAY;AAAA,YACjBD,KAAW,gBAAAG,EAAC,OAAA,EAAK,UAAAD,EAAA,CAAiB;AAAA,UAAA,EAAA,CACrC,EAAA,CACF;AAAA,QAEJ;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAAlB,EAAE,wBAAwB,GAAE;AAAA,QACpD,KAAK;AAAA,QACL,QAAQ,CAAAU,MACN,gBAAAI,EAACC,GAAA,EAAK,YAAY,UAAU,gBAAgB,UAC1C,UAAA,gBAAAD,EAAC,SAAI,WAAWG,EAAO,SACpB,UAAAP,EAAS,SACR,gBAAAI,EAACZ,EAAW,OAAX,EAAiB,QAAO,WAAW,UAAAF,EAAE,wBAAwB,EAAA,CAAE,IAEhE,gBAAAc,EAACZ,EAAW,OAAX,EAAiB,QAAO,QAAQ,UAAAF,EAAE,0BAA0B,GAAE,GAEnE,EAAA,CACF;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEF,UAAU,CAAAU,MAEN,gBAAAI;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,cAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,OAAOnB,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAM,EAAWI,CAAQ;AAAA,YACrB;AAAA,YACA,MAAM,gBAAAI,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SAAIf,MAAS,uBACJ,OAGF,gBAAAS,EAACO,GAAA,EAAS,OAAM,QAAQ,GAAGb,GAAe;AACnD;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":";;;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,MAAAC,GAAM,YAAAC,EAAA,IAAeC,EAAA,GAErC,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAML,KAAgB,CAAA;AAAA,IACtB,SAAS;AAAA,MACP;AAAA,QACE,OAAOJ,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAU,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,EAAS,OAAOA,EAAS;AACrD,UAAIE,KAAeA,EAAY,SAAS,IACtCA,IAAcA,EAAY,OAAO,CAAC,EAAE,gBAAgBA,EAAY,MAAM,CAAC,IAEvEA,IAAcF,EAAS;AAEzB,gBAAMG,IAAmBH,EAAS;AAClC,iBACE,gBAAAI,EAACC,GAAA,EAAK,eAAe,UAAU,KAAK,GAClC,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,SACrB,UAAA;AAAA,YAAA,gBAAAH,EAAC,SAAK,UAAAF,EAAA,CAAY;AAAA,YACjBD,KAAW,gBAAAG,EAAC,OAAA,EAAK,UAAAD,EAAA,CAAiB;AAAA,UAAA,EAAA,CACrC,EAAA,CACF;AAAA,QAEJ;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAAlB,EAAE,wBAAwB,GAAE;AAAA,QACpD,KAAK;AAAA,QACL,QAAQ,CAAAU,MACN,gBAAAI,EAACC,GAAA,EAAK,YAAY,UAAU,gBAAgB,UAC1C,UAAA,gBAAAD,EAAC,SAAI,WAAWG,EAAO,SACpB,UAAAP,EAAS,SACR,gBAAAI,EAACZ,EAAW,OAAX,EAAiB,QAAO,WAAW,UAAAF,EAAE,wBAAwB,EAAA,CAAE,IAEhE,gBAAAc,EAACZ,EAAW,OAAX,EAAiB,QAAO,QAAQ,UAAAF,EAAE,0BAA0B,GAAE,GAEnE,EAAA,CACF;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEF,UAAU,CAAAU,MAEN,gBAAAI;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,cAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,OAAOnB,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAM,EAAWI,CAAQ;AAAA,YACrB;AAAA,YACA,MAAM,gBAAAI,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SAAIf,MAAS,uBACJ,OAGF,gBAAAS,EAACO,GAAA,EAAS,OAAM,QAAQ,GAAGb,GAAe;AACnD;"}
@@ -1,7 +1,6 @@
1
1
  import { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate';
2
- import { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist';
3
- import { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject';
4
- import { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview';
2
+ import { PaySchedule, PaySchedule as PayScheduleType } from '@gusto/embedded-api/models/components/payschedule';
3
+ import { PaySchedulePreviewPayPeriod } from '@gusto/embedded-api/models/components/payschedulepreviewpayperiod';
5
4
  import { z } from 'zod';
6
5
  import { RequireAtLeastOne } from '../../../types/Helpers';
7
6
  export type MODE = 'LIST_PAY_SCHEDULES' | 'ADD_PAY_SCHEDULE' | 'EDIT_PAY_SCHEDULE' | 'PREVIEW_PAY_SCHEDULE';
@@ -13,11 +12,11 @@ type PayScheduleContextType = {
13
12
  handleContinue: () => void;
14
13
  mode: MODE;
15
14
  isPending: boolean;
16
- paySchedules: PayScheduleList[] | undefined | null;
15
+ paySchedules: PaySchedule[] | undefined | null;
17
16
  currentPaySchedule: PayScheduleType | undefined | null;
18
- payPeriodPreview?: PayPeriods[];
17
+ payPeriodPreview?: PaySchedulePreviewPayPeriod[];
19
18
  payPreviewLoading?: boolean;
20
- paymentSpeed?: string;
19
+ paymentSpeedDays: number;
21
20
  };
22
21
  export declare const PayScheduleSchema: z.ZodObject<{
23
22
  frequency: z.ZodEnum<{
@@ -11,11 +11,9 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
11
11
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
12
12
  import "@gusto/embedded-api/models/errors/httpclienterrors";
13
13
  import "../../../shared/constants.js";
14
- import "classnames";
15
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
15
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
18
- const f = o.object({
16
+ const x = o.object({
19
17
  frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
20
18
  anchorPayDate: o.date().optional(),
21
19
  anchorEndOfPayPeriod: o.date().optional(),
@@ -23,10 +21,10 @@ const f = o.object({
23
21
  day2: o.number().min(1).max(31).optional(),
24
22
  customName: o.string().optional(),
25
23
  customTwicePerMonth: o.string().optional()
26
- }), [w, b] = t("PayScheduleContext");
24
+ }), [S, f] = t("PayScheduleContext");
27
25
  export {
28
- b as PayScheduleProvider,
29
- f as PayScheduleSchema,
30
- w as usePaySchedule
26
+ f as PayScheduleProvider,
27
+ x as PayScheduleSchema,
28
+ S as usePaySchedule
31
29
  };
32
30
  //# sourceMappingURL=usePaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n isPending: boolean\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n paymentSpeed?: string\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AA6BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
1
+ {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type {\n PaySchedule,\n PaySchedule as PayScheduleType,\n} from '@gusto/embedded-api/models/components/payschedule'\nimport type { PaySchedulePreviewPayPeriod } from '@gusto/embedded-api/models/components/payschedulepreviewpayperiod'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n isPending: boolean\n paySchedules: PaySchedule[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PaySchedulePreviewPayPeriod[]\n payPreviewLoading?: boolean\n paymentSpeedDays: number\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AA+BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
@@ -2,10 +2,9 @@ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useStateTaxesForm as s } from "./context.js";
4
4
  import "../../../../shared/constants.js";
5
- import "classnames";
6
5
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
6
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function y() {
7
+ function x() {
9
8
  const { t } = a("Company.StateTaxes", { keyPrefix: "form" }), { handleCancel: r, isPending: e } = s(), o = c();
10
9
  return /* @__PURE__ */ i(m, { children: [
11
10
  /* @__PURE__ */ n(o.Button, { variant: "secondary", onClick: r, children: t("cancelCta") }),
@@ -13,6 +12,6 @@ function y() {
13
12
  ] });
14
13
  }
15
14
  export {
16
- y as Actions
15
+ x as Actions
17
16
  };
18
17
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,4 +1,4 @@
1
- import { jsx as o, jsxs as V, Fragment as q } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as q, Fragment as V } from "react/jsx-runtime";
2
2
  import { useForm as B, FormProvider as D } from "react-hook-form";
3
3
  import { zodResolver as K } from "@hookform/resolvers/zod";
4
4
  import { useTaxRequirementsUpdateStateMutation as M } from "@gusto/embedded-api/react-query/taxRequirementsUpdateState";
@@ -16,45 +16,45 @@ import { Flex as I } from "../../../Common/Flex/Flex.js";
16
16
  import { Form as J } from "../../../Common/Form/Form.js";
17
17
  import { componentEvents as g } from "../../../../shared/constants.js";
18
18
  import { useBase as Q } from "../../../Base/useBase.js";
19
- function he(a) {
20
- return /* @__PURE__ */ o(Y, { ...a, children: /* @__PURE__ */ o(W, { ...a, children: a.children }) });
19
+ function he(n) {
20
+ return /* @__PURE__ */ t(Y, { ...n, children: /* @__PURE__ */ t(W, { ...n, children: n.children }) });
21
21
  }
22
- function W({ companyId: a, state: f, className: k, children: y }) {
22
+ function W({ companyId: n, state: c, className: k, children: y }) {
23
23
  $("Company.StateTaxes");
24
- const { onEvent: S, baseSubmitHandler: b } = Q(), { t: h } = H("Company.StateTaxes", { keyPrefix: "form" }), { data: P } = w({ companyUuid: a, state: f }), c = P.taxRequirementsState, { mutateAsync: j, isPending: A } = M(), { dynamicSchema: C, defaultValues: E } = z(() => {
25
- const l = {}, n = {};
26
- return c.requirementSets?.forEach((t) => {
27
- if (!t.key) return;
28
- const r = t.key, i = {}, s = {};
29
- t.requirements?.forEach((e) => {
24
+ const { onEvent: S, baseSubmitHandler: b } = Q(), { t: h } = H("Company.StateTaxes", { keyPrefix: "form" }), { data: P } = w({ companyUuid: n, state: c }), l = P.taxRequirementsState, { mutateAsync: j, isPending: A } = M(), { dynamicSchema: C, defaultValues: E } = z(() => {
25
+ const f = {}, a = {};
26
+ return l.requirementSets?.forEach((o) => {
27
+ if (!o.key) return;
28
+ const r = o.key, i = {}, s = {};
29
+ o.requirements?.forEach((e) => {
30
30
  if (!e.key) return;
31
- const d = e.key, _ = e.metadata?.type === "tax_rate" || e.metadata?.type === "percent";
32
- e.metadata?.type === "radio" ? s[d] = e.value ?? void 0 : s[d] = e.value ? String(e.value) : "";
33
- let u = m.string().optional();
31
+ const u = e.key, _ = e.metadata?.type === "tax_rate" || e.metadata?.type === "percent";
32
+ e.metadata?.type === "radio" ? s[u] = e.value ?? void 0 : s[u] = e.value ? String(e.value) : "";
33
+ let d = m.string().optional();
34
34
  const p = e.metadata?.validation;
35
35
  if (p && _ && p.type === "one_of") {
36
36
  const T = p.rates;
37
- u = m.string().optional().refine((F) => !F || T.includes(F), {
37
+ d = m.string().optional().refine((F) => !F || T.includes(F), {
38
38
  message: h("validations.oneOf", { values: T.join(", ") })
39
39
  });
40
40
  }
41
- e.metadata?.type === "radio" && (u = m.boolean().optional()), i[d] = u;
42
- }), Object.keys(i).length > 0 && (l[r] = m.object(i), n[r] = s);
41
+ e.metadata?.type === "radio" && (d = m.boolean().optional()), i[u] = d;
42
+ }), Object.keys(i).length > 0 && (f[r] = m.object(i), a[r] = s);
43
43
  }), {
44
- dynamicSchema: m.object(l),
45
- defaultValues: n
44
+ dynamicSchema: m.object(f),
45
+ defaultValues: a
46
46
  };
47
- }, [c, h]), { control: R, ...v } = B({
47
+ }, [l, h]), { control: R, ...v } = B({
48
48
  resolver: K(C),
49
49
  defaultValues: E
50
- }), O = async (l) => {
51
- await b(l, async (n) => {
52
- const x = c.requirementSets?.filter((t) => t.key && n[t.key]).map((t) => {
53
- const r = t.key, i = n[r];
50
+ }), O = async (f) => {
51
+ await b(f, async (a) => {
52
+ const x = l.requirementSets?.filter((o) => o.key && a[o.key]).map((o) => {
53
+ const r = o.key, i = a[r];
54
54
  return {
55
- state: t.state,
55
+ state: c,
56
56
  key: r,
57
- effectiveFrom: t.effectiveFrom,
57
+ effectiveFrom: o.effectiveFrom,
58
58
  requirements: Object.entries(i).map(([s, e]) => ({
59
59
  key: s,
60
60
  value: String(e)
@@ -63,23 +63,23 @@ function W({ companyId: a, state: f, className: k, children: y }) {
63
63
  });
64
64
  await j({
65
65
  request: {
66
- companyUuid: a,
66
+ companyUuid: n,
67
67
  requestBody: { requirementSets: x },
68
- state: f
68
+ state: c
69
69
  }
70
70
  }), S(g.COMPANY_STATE_TAX_UPDATED);
71
71
  });
72
72
  }, U = () => {
73
73
  S(g.CANCEL);
74
74
  };
75
- return /* @__PURE__ */ o("section", { className: k, children: /* @__PURE__ */ o(D, { ...v, control: R, children: /* @__PURE__ */ o(J, { onSubmit: v.handleSubmit(O), children: /* @__PURE__ */ o(
75
+ return /* @__PURE__ */ t("section", { className: k, children: /* @__PURE__ */ t(D, { ...v, control: R, children: /* @__PURE__ */ t(J, { onSubmit: v.handleSubmit(O), children: /* @__PURE__ */ t(
76
76
  G,
77
77
  {
78
- value: { stateTaxRequirements: c, isPending: A, state: f, handleCancel: U },
79
- children: /* @__PURE__ */ o(I, { flexDirection: "column", gap: 32, children: y || /* @__PURE__ */ V(q, { children: [
80
- /* @__PURE__ */ o(N, {}),
81
- /* @__PURE__ */ o(L, {}),
82
- /* @__PURE__ */ o(X, {})
78
+ value: { stateTaxRequirements: l, isPending: A, state: c, handleCancel: U },
79
+ children: /* @__PURE__ */ t(I, { flexDirection: "column", gap: 32, children: y || /* @__PURE__ */ q(V, { children: [
80
+ /* @__PURE__ */ t(N, {}),
81
+ /* @__PURE__ */ t(L, {}),
82
+ /* @__PURE__ */ t(X, {})
83
83
  ] }) })
84
84
  }
85
85
  ) }) }) });
@@ -1 +1 @@
1
- {"version":3,"file":"StateTaxesForm.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTaxRequirementsUpdateStateMutation } from '@gusto/embedded-api/react-query/taxRequirementsUpdateState'\nimport { useTaxRequirementsGetSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGet'\nimport { z } from 'zod'\nimport { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Head } from './Head'\nimport { StateTaxesFormProvider } from './context'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\ninterface StateTaxesFormProps extends CommonComponentInterface {\n companyId: string\n state: string\n}\n\nexport function StateTaxesForm(props: StateTaxesFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, state, className, children }: StateTaxesFormProps) {\n useI18n('Company.StateTaxes')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { data } = useTaxRequirementsGetSuspense({ companyUuid: companyId, state })\n const stateTaxRequirements = data.taxRequirementsState!\n\n const { mutateAsync: updateStateTax, isPending: isPendingUpdate } =\n useTaxRequirementsUpdateStateMutation()\n\n // Schema and default value generation\n const { dynamicSchema, defaultValues } = useMemo(() => {\n const schemaShape: Record<string, z.ZodObject> = {}\n const values: Partial<Record<string, Record<string, string | boolean | number | undefined>>> =\n {}\n\n //Looping through each requirement set\n stateTaxRequirements.requirementSets?.forEach(requirementSet => {\n if (!requirementSet.key) return\n\n const requirementSetKey = requirementSet.key\n const requirementShape: Record<string, z.ZodType> = {}\n const requirementValues: Record<string, string | boolean | number | undefined> = {}\n\n requirementSet.requirements?.forEach(requirement => {\n if (!requirement.key) return\n\n const requirementKey = requirement.key\n\n const isPercentField =\n requirement.metadata?.type === 'tax_rate' || requirement.metadata?.type === 'percent'\n\n if (requirement.metadata?.type === 'radio') {\n requirementValues[requirementKey] = requirement.value ?? undefined\n } else {\n requirementValues[requirementKey] = requirement.value ? String(requirement.value) : ''\n }\n\n let fieldSchema: z.ZodType = z.string().optional()\n\n const validation = requirement.metadata?.validation\n\n if (validation) {\n if (isPercentField && validation.type === 'one_of') {\n const oneOfValues = validation.rates as string[]\n fieldSchema = z\n .string()\n .optional()\n .refine(val => !val || oneOfValues.includes(val), {\n message: t('validations.oneOf', { values: oneOfValues.join(', ') }),\n })\n }\n }\n\n if (requirement.metadata?.type === 'radio') {\n fieldSchema = z.boolean().optional()\n }\n requirementShape[requirementKey] = fieldSchema\n // --- End Schema Logic ---\n })\n\n if (Object.keys(requirementShape).length > 0) {\n schemaShape[requirementSetKey] = z.object(requirementShape)\n values[requirementSetKey] = requirementValues\n }\n })\n\n const finalSchema = z.object(schemaShape)\n\n // Return both the schema and the default values\n return {\n dynamicSchema: finalSchema,\n defaultValues: values as z.infer<typeof finalSchema>,\n }\n }, [stateTaxRequirements, t])\n\n // Infer the type from the schema\n type InferredFormInputs = z.infer<typeof dynamicSchema>\n\n const { control, ...methods } = useForm({\n resolver: zodResolver(dynamicSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InferredFormInputs) => {\n await baseSubmitHandler(formData, async payload => {\n const requirementSets = stateTaxRequirements.requirementSets\n ?.filter(rs => rs.key && payload[rs.key])\n .map(requirementSet => {\n const requirementSetKey = requirementSet.key as string\n const payloadSet = payload[requirementSetKey] as Record<string, unknown>\n\n return {\n state: requirementSet.state,\n key: requirementSetKey,\n effectiveFrom: requirementSet.effectiveFrom,\n requirements: Object.entries(payloadSet).map(([reqKey, value]) => ({\n key: reqKey,\n value: String(value),\n })),\n }\n })\n await updateStateTax({\n request: {\n companyUuid: companyId,\n requestBody: { requirementSets },\n state,\n },\n })\n onEvent(componentEvents.COMPANY_STATE_TAX_UPDATED)\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <StateTaxesFormProvider\n value={{ stateTaxRequirements, isPending: isPendingUpdate, state, handleCancel }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </StateTaxesFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n"],"names":["StateTaxesForm","props","jsx","BaseComponent","Root","companyId","state","className","children","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","data","useTaxRequirementsGetSuspense","stateTaxRequirements","updateStateTax","isPendingUpdate","useTaxRequirementsUpdateStateMutation","dynamicSchema","defaultValues","useMemo","schemaShape","values","requirementSet","requirementSetKey","requirementShape","requirementValues","requirement","requirementKey","isPercentField","fieldSchema","z","validation","oneOfValues","val","control","methods","useForm","zodResolver","onSubmit","formData","payload","requirementSets","rs","payloadSet","reqKey","value","componentEvents","handleCancel","FormProvider","HtmlForm","StateTaxesFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":"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"}
1
+ {"version":3,"file":"StateTaxesForm.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTaxRequirementsUpdateStateMutation } from '@gusto/embedded-api/react-query/taxRequirementsUpdateState'\nimport { useTaxRequirementsGetSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGet'\nimport { z } from 'zod'\nimport { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Head } from './Head'\nimport { StateTaxesFormProvider } from './context'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\ninterface StateTaxesFormProps extends CommonComponentInterface {\n companyId: string\n state: string\n}\n\nexport function StateTaxesForm(props: StateTaxesFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, state, className, children }: StateTaxesFormProps) {\n useI18n('Company.StateTaxes')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { data } = useTaxRequirementsGetSuspense({ companyUuid: companyId, state })\n const stateTaxRequirements = data.taxRequirementsState!\n\n const { mutateAsync: updateStateTax, isPending: isPendingUpdate } =\n useTaxRequirementsUpdateStateMutation()\n\n // Schema and default value generation\n const { dynamicSchema, defaultValues } = useMemo(() => {\n const schemaShape: Record<string, z.ZodObject> = {}\n const values: Partial<Record<string, Record<string, string | boolean | number | undefined>>> =\n {}\n\n //Looping through each requirement set\n stateTaxRequirements.requirementSets?.forEach(requirementSet => {\n if (!requirementSet.key) return\n\n const requirementSetKey = requirementSet.key\n const requirementShape: Record<string, z.ZodType> = {}\n const requirementValues: Record<string, string | boolean | number | undefined> = {}\n\n requirementSet.requirements?.forEach(requirement => {\n if (!requirement.key) return\n\n const requirementKey = requirement.key\n\n const isPercentField =\n requirement.metadata?.type === 'tax_rate' || requirement.metadata?.type === 'percent'\n\n if (requirement.metadata?.type === 'radio') {\n requirementValues[requirementKey] = requirement.value ?? undefined\n } else {\n requirementValues[requirementKey] = requirement.value ? String(requirement.value) : ''\n }\n\n let fieldSchema: z.ZodType = z.string().optional()\n\n const validation = requirement.metadata?.validation\n\n if (validation) {\n if (isPercentField && validation.type === 'one_of') {\n const oneOfValues = validation.rates as string[]\n fieldSchema = z\n .string()\n .optional()\n .refine(val => !val || oneOfValues.includes(val), {\n message: t('validations.oneOf', { values: oneOfValues.join(', ') }),\n })\n }\n }\n\n if (requirement.metadata?.type === 'radio') {\n fieldSchema = z.boolean().optional()\n }\n requirementShape[requirementKey] = fieldSchema\n // --- End Schema Logic ---\n })\n\n if (Object.keys(requirementShape).length > 0) {\n schemaShape[requirementSetKey] = z.object(requirementShape)\n values[requirementSetKey] = requirementValues\n }\n })\n\n const finalSchema = z.object(schemaShape)\n\n // Return both the schema and the default values\n return {\n dynamicSchema: finalSchema,\n defaultValues: values as z.infer<typeof finalSchema>,\n }\n }, [stateTaxRequirements, t])\n\n // Infer the type from the schema\n type InferredFormInputs = z.infer<typeof dynamicSchema>\n\n const { control, ...methods } = useForm({\n resolver: zodResolver(dynamicSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InferredFormInputs) => {\n await baseSubmitHandler(formData, async payload => {\n const requirementSets = stateTaxRequirements.requirementSets\n ?.filter(rs => rs.key && payload[rs.key])\n .map(requirementSet => {\n const requirementSetKey = requirementSet.key as string\n const payloadSet = payload[requirementSetKey] as Record<string, unknown>\n\n return {\n state,\n key: requirementSetKey,\n effectiveFrom: requirementSet.effectiveFrom,\n requirements: Object.entries(payloadSet).map(([reqKey, value]) => ({\n key: reqKey,\n value: String(value),\n })),\n }\n })\n await updateStateTax({\n request: {\n companyUuid: companyId,\n requestBody: { requirementSets },\n state,\n },\n })\n onEvent(componentEvents.COMPANY_STATE_TAX_UPDATED)\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <StateTaxesFormProvider\n value={{ stateTaxRequirements, isPending: isPendingUpdate, state, handleCancel }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </StateTaxesFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n"],"names":["StateTaxesForm","props","jsx","BaseComponent","Root","companyId","state","className","children","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","data","useTaxRequirementsGetSuspense","stateTaxRequirements","updateStateTax","isPendingUpdate","useTaxRequirementsUpdateStateMutation","dynamicSchema","defaultValues","useMemo","schemaShape","values","requirementSet","requirementSetKey","requirementShape","requirementValues","requirement","requirementKey","isPercentField","fieldSchema","z","validation","oneOfValues","val","control","methods","useForm","zodResolver","onSubmit","formData","payload","requirementSets","rs","payloadSet","reqKey","value","componentEvents","handleCancel","FormProvider","HtmlForm","StateTaxesFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":"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"}
@@ -10,13 +10,11 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../../shared/constants.js";
13
- import "classnames";
14
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
17
- const [u, f] = t("StateTaxesFormContext");
15
+ const [c, d] = t("StateTaxesFormContext");
18
16
  export {
19
- f as StateTaxesFormProvider,
20
- u as useStateTaxesForm
17
+ d as StateTaxesFormProvider,
18
+ c as useStateTaxesForm
21
19
  };
22
20
  //# 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;"}
@@ -2,14 +2,13 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
3
  import { useStateTaxesList as e } from "./context.js";
4
4
  import "../../../../shared/constants.js";
5
- import "classnames";
6
5
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
6
  import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function x() {
7
+ function l() {
9
8
  const { t: o } = i("Company.StateTaxes"), n = s(), { handleContinue: r } = e();
10
9
  return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
11
10
  }
12
11
  export {
13
- x as Actions
12
+ l as Actions
14
13
  };
15
14
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
@@ -2,14 +2,13 @@ import { jsx as s, Fragment as p } from "react/jsx-runtime";
2
2
  import { useTranslation as o } from "react-i18next";
3
3
  import { useStateTaxesList as l } from "./context.js";
4
4
  import "../../../../shared/constants.js";
5
- import "classnames";
6
5
  import { EmptyData as c } from "../../../Common/EmptyData/EmptyData.js";
7
6
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
7
  import { useDataView as d } from "../../../Common/DataView/useDataView.js";
9
8
  import { DataView as C } from "../../../Common/DataView/DataView.js";
10
- const b = () => {
11
- const { stateTaxRequirements: r, handleChange: n } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
12
- data: r,
9
+ const k = () => {
10
+ const { stateTaxRequirements: n, handleChange: r } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
11
+ data: n,
13
12
  columns: [
14
13
  {
15
14
  key: "state",
@@ -27,7 +26,7 @@ const b = () => {
27
26
  {
28
27
  variant: "secondary",
29
28
  onClick: () => {
30
- n(e.state);
29
+ e.state && r(e.state);
31
30
  },
32
31
  children: e.setupComplete ? t("editStateTaxCta") : t("continueStateTaxSetupCta")
33
32
  }
@@ -37,6 +36,6 @@ const b = () => {
37
36
  return /* @__PURE__ */ s(C, { label: t("requirementsListLabel"), ...m });
38
37
  };
39
38
  export {
40
- b as List
39
+ k as List
41
40
  };
42
41
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAKtF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n if (requirement.state) handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAIM,EAAY,SAAOR,EAAaQ,EAAY,KAAK;AAAA,QACvD;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAKtF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
@@ -1,22 +1,22 @@
1
1
  import { jsx as e, jsxs as c, Fragment as l } 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 u } from "./Actions.js";
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
6
  import { List as h } from "./List.js";
7
7
  import { BaseComponent as T } from "../../../Base/Base.js";
8
8
  import { useI18n as x } from "../../../../i18n/I18n.js";
9
9
  import { Flex as A } from "../../../Common/Flex/Flex.js";
10
10
  import { componentEvents as r } from "../../../../shared/constants.js";
11
11
  import { useBase as C } from "../../../Base/useBase.js";
12
- function y(n) {
13
- return /* @__PURE__ */ e(T, { ...n, children: /* @__PURE__ */ e(E, { ...n, children: n.children }) });
12
+ function B(t) {
13
+ return /* @__PURE__ */ e(T, { ...t, children: /* @__PURE__ */ e(S, { ...t, children: t.children }) });
14
14
  }
15
- function E({ className: n, children: t, companyId: i }) {
15
+ function S({ className: t, children: n, companyId: i }) {
16
16
  x("Company.StateTaxes");
17
- const { onEvent: o } = C(), { data: m } = d({ companyUuid: i }), s = m.responseBodies;
18
- return /* @__PURE__ */ e("section", { className: n, children: /* @__PURE__ */ e(
19
- p,
17
+ const { onEvent: o } = C(), { data: m } = u({ companyUuid: i }), s = m.taxRequirementStatesList;
18
+ return /* @__PURE__ */ e("section", { className: t, children: /* @__PURE__ */ e(
19
+ f,
20
20
  {
21
21
  value: {
22
22
  isPending: !1,
@@ -28,15 +28,15 @@ function E({ className: n, children: t, companyId: i }) {
28
28
  o(r.COMPANY_STATE_TAX_EDIT, { state: a });
29
29
  }
30
30
  },
31
- children: /* @__PURE__ */ e(A, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ c(l, { children: [
32
- /* @__PURE__ */ e(f, {}),
31
+ children: /* @__PURE__ */ e(A, { flexDirection: "column", gap: 32, children: n || /* @__PURE__ */ c(l, { children: [
32
+ /* @__PURE__ */ e(d, {}),
33
33
  /* @__PURE__ */ e(h, {}),
34
- /* @__PURE__ */ e(u, {})
34
+ /* @__PURE__ */ e(p, {})
35
35
  ] }) })
36
36
  }
37
37
  ) });
38
38
  }
39
39
  export {
40
- y as StateTaxesList
40
+ B as StateTaxesList
41
41
  };
42
42
  //# sourceMappingURL=StateTaxesList.js.map