@gusto/embedded-react-sdk 0.37.0 → 0.38.0-rc.2

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 (969) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +3 -0
  3. package/dist/UNSTABLE_Hooks.d.ts +1 -1
  4. package/dist/UNSTABLE_Hooks.js +65 -47
  5. package/dist/UNSTABLE_Hooks.js.map +1 -1
  6. package/dist/assets/icons/filter-funnel.svg.js +10 -0
  7. package/dist/assets/icons/filter-funnel.svg.js.map +1 -0
  8. package/dist/assets/icons/percent-circle.svg.js +10 -0
  9. package/dist/assets/icons/percent-circle.svg.js.map +1 -0
  10. package/dist/assets/icons/plus-circle.svg.js +1 -1
  11. package/dist/assets/icons/plus-circle.svg.js.map +1 -1
  12. package/dist/components/Base/Base.js +2 -3
  13. package/dist/components/Base/Base.js.map +1 -1
  14. package/dist/components/Base/createCompoundContext.js.map +1 -1
  15. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +5 -3
  16. package/dist/components/Common/DataView/DataCards/DataCards.js +58 -39
  17. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  18. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +9 -7
  19. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  20. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +4 -2
  21. package/dist/components/Common/DataView/DataTable/DataTable.js +95 -76
  22. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  23. package/dist/components/Common/DataView/DataView.d.ts +4 -3
  24. package/dist/components/Common/DataView/DataView.js +24 -22
  25. package/dist/components/Common/DataView/DataView.js.map +1 -1
  26. package/dist/components/Common/DataView/useDataView.d.ts +33 -6
  27. package/dist/components/Common/DataView/useDataView.js +23 -20
  28. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  29. package/dist/components/Common/DataView/useSelectionState.d.ts +5 -0
  30. package/dist/components/Common/DataView/useSelectionState.js +8 -0
  31. package/dist/components/Common/DataView/useSelectionState.js.map +1 -0
  32. package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +19 -0
  33. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +94 -0
  34. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -0
  35. package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +14 -0
  36. package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -0
  37. package/dist/components/Common/DetailViewLayout/DetailViewLayout.d.ts +2 -0
  38. package/dist/components/Common/DetailViewLayout/DetailViewLayoutTypes.d.ts +40 -0
  39. package/dist/components/Common/DetailViewLayout/index.d.ts +3 -0
  40. package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
  41. package/dist/components/Common/EmptyData/EmptyData.js +15 -13
  42. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  43. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
  44. package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
  45. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +26 -24
  46. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
  47. package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
  48. package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +32 -30
  49. package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
  50. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +1 -1
  51. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +36 -34
  52. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
  53. package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +1 -1
  54. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +40 -38
  55. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
  56. package/dist/components/Common/Fields/FileInputField/FileInputField.js +24 -22
  57. package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -1
  58. package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +24 -22
  59. package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -1
  60. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +27 -25
  61. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
  62. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
  63. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +34 -32
  64. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  65. package/dist/components/Common/Fields/SelectField/SelectField.d.ts +1 -1
  66. package/dist/components/Common/Fields/SelectField/SelectField.js +34 -32
  67. package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
  68. package/dist/components/Common/Fields/SwitchField/SwitchField.js +26 -24
  69. package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
  70. package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +24 -22
  71. package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -1
  72. package/dist/components/Common/Fields/TextInputField/TextInputField.js +26 -24
  73. package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
  74. package/dist/components/Common/Fields/hooks/useField.d.ts +3 -2
  75. package/dist/components/Common/Fields/hooks/useField.js +37 -33
  76. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  77. package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.d.ts +2 -2
  78. package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js +2 -2
  79. package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js.map +1 -1
  80. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +21 -20
  81. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  82. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +5 -0
  83. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -1
  84. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +10 -8
  85. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
  86. package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
  87. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
  88. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  89. package/dist/components/Common/SignatureForm/SignatureFormActions.js +9 -12
  90. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  91. package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -18
  92. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  93. package/dist/components/Common/UI/Box/Box.d.ts +1 -1
  94. package/dist/components/Common/UI/Box/Box.js +9 -8
  95. package/dist/components/Common/UI/Box/Box.js.map +1 -1
  96. package/dist/components/Common/UI/Box/Box.module.scss.js +12 -8
  97. package/dist/components/Common/UI/Box/Box.module.scss.js.map +1 -1
  98. package/dist/components/Common/UI/Box/BoxTypes.d.ts +2 -9
  99. package/dist/components/Common/UI/BoxHeader/BoxHeader.d.ts +2 -0
  100. package/dist/components/Common/UI/BoxHeader/BoxHeader.js +23 -0
  101. package/dist/components/Common/UI/BoxHeader/BoxHeader.js.map +1 -0
  102. package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js +8 -0
  103. package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js.map +1 -0
  104. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +10 -0
  105. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js +7 -0
  106. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -0
  107. package/dist/components/Common/UI/BoxHeader/index.d.ts +2 -0
  108. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +17 -17
  109. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
  110. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +5 -0
  111. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
  112. package/dist/components/Common/UI/Button/Button.js +33 -29
  113. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  114. package/dist/components/Common/UI/Button/Button.module.scss.js +5 -3
  115. package/dist/components/Common/UI/Button/Button.module.scss.js.map +1 -1
  116. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -0
  117. package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
  118. package/dist/components/Common/UI/Checkbox/Checkbox.js +60 -49
  119. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  120. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +10 -6
  121. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js.map +1 -1
  122. package/dist/components/Common/UI/ComboBox/ComboBox.js +1 -1
  123. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  124. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +1 -1
  125. package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
  126. package/dist/components/Common/UI/DatePicker/DatePicker.js +88 -69
  127. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  128. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +13 -0
  129. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.d.ts +2 -0
  130. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +72 -0
  131. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -0
  132. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +30 -0
  133. package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js.map +1 -0
  134. package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +14 -0
  135. package/dist/components/Common/UI/DateRangePicker/index.d.ts +2 -0
  136. package/dist/components/Common/UI/DescriptionList/DescriptionList.js +19 -12
  137. package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
  138. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +6 -4
  139. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -1
  140. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +6 -1
  141. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +4 -1
  142. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
  143. package/dist/components/Common/UI/Heading/Heading.d.ts +1 -1
  144. package/dist/components/Common/UI/Heading/Heading.js +11 -9
  145. package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
  146. package/dist/components/Common/UI/Heading/Heading.module.scss.js +15 -15
  147. package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -1
  148. package/dist/components/Common/UI/Input/Input.js.map +1 -1
  149. package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
  150. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +94 -80
  151. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
  152. package/dist/components/Common/UI/NumberInput/NumberInput.js +1 -1
  153. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  154. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +1 -1
  155. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  156. package/dist/components/Common/UI/Select/Select.js +22 -22
  157. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  158. package/dist/components/Common/UI/Select/SelectTypes.d.ts +1 -1
  159. package/dist/components/Common/UI/Table/Table.js +12 -12
  160. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  161. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  162. package/dist/components/Common/UI/Table/TableTypes.d.ts +3 -3
  163. package/dist/components/Common/UI/Table/TableTypes.js +3 -3
  164. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  165. package/dist/components/Common/UI/TextArea/TextArea.js +1 -1
  166. package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -1
  167. package/dist/components/Common/UI/TextInput/TextInput.js +13 -13
  168. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  169. package/dist/components/Common/index.d.ts +2 -0
  170. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
  171. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  172. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -5
  173. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  174. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -4
  175. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  176. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
  177. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  178. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  179. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  180. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  181. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  182. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -4
  183. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  184. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
  185. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  186. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -14
  187. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  188. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  189. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  190. package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -5
  191. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  192. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  193. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  194. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -10
  195. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  196. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
  197. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  198. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  199. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  200. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +8 -10
  201. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  202. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -10
  203. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  204. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
  205. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  206. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -4
  207. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  208. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
  209. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  210. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  211. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  212. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
  213. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  214. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  215. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  216. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  217. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  218. package/dist/components/Company/FederalTaxes/FederalTaxes.js +22 -26
  219. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  220. package/dist/components/Company/FederalTaxes/Form.js +7 -9
  221. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  222. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
  223. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  224. package/dist/components/Company/Industry/Actions.js +7 -9
  225. package/dist/components/Company/Industry/Actions.js.map +1 -1
  226. package/dist/components/Company/Industry/Context.js +6 -7
  227. package/dist/components/Company/Industry/Context.js.map +1 -1
  228. package/dist/components/Company/Industry/Edit.js +4 -7
  229. package/dist/components/Company/Industry/Edit.js.map +1 -1
  230. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -10
  231. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  232. package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
  233. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  234. package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
  235. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  236. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  237. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  238. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  239. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  240. package/dist/components/Company/Locations/LocationsList/List.js +15 -16
  241. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  242. package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
  243. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  244. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  245. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  246. package/dist/components/Company/OnboardingOverview/Completed.js +12 -15
  247. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  248. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
  249. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  250. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
  251. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  252. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  253. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  254. package/dist/components/Company/PaySchedule/PaySchedule.js +94 -91
  255. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  256. package/dist/components/Company/PaySchedule/_parts/Actions.js +16 -18
  257. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  258. package/dist/components/Company/PaySchedule/_parts/Edit.js +47 -39
  259. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  260. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
  261. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  262. package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
  263. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  264. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +6 -5
  265. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  266. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  267. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -4
  268. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  269. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +33 -33
  270. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  271. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  272. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  273. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -4
  274. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  275. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
  276. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  277. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +14 -14
  278. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  279. package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +2 -2
  280. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  281. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  282. package/dist/components/Contractor/Address/Address.js +3 -7
  283. package/dist/components/Contractor/Address/Address.js.map +1 -1
  284. package/dist/components/Contractor/Address/Form.js +2 -4
  285. package/dist/components/Contractor/Address/Form.js.map +1 -1
  286. package/dist/components/Contractor/Address/useAddress.js +5 -6
  287. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  288. package/dist/components/Contractor/ContractorList/index.js +33 -34
  289. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  290. package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
  291. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  292. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -13
  293. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  294. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  295. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  296. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
  297. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  298. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +135 -126
  299. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  300. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
  301. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +72 -71
  302. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  303. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  304. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
  305. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
  306. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  307. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
  308. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +83 -84
  309. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  310. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
  311. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  312. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +10 -10
  313. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  314. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +67 -79
  315. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  316. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +10 -12
  317. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -1
  318. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +47 -49
  319. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  320. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +63 -66
  321. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  322. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +4 -4
  323. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  324. package/dist/components/Contractor/Profile/useContractorProfile.js +31 -30
  325. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  326. package/dist/components/Contractor/Submit/Submit.d.ts +2 -2
  327. package/dist/components/Contractor/Submit/Submit.js +44 -46
  328. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  329. package/dist/components/Employee/Compensation/Actions.js +12 -14
  330. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  331. package/dist/components/Employee/Compensation/Compensation.js +80 -77
  332. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  333. package/dist/components/Employee/Compensation/Edit.js +27 -28
  334. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  335. package/dist/components/Employee/Compensation/List.js +22 -23
  336. package/dist/components/Employee/Compensation/List.js.map +1 -1
  337. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
  338. package/dist/components/Employee/Dashboard/BasicDetailsView.js +107 -0
  339. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -0
  340. package/dist/components/Employee/Dashboard/Dashboard.d.ts +5 -0
  341. package/dist/components/Employee/Dashboard/Dashboard.js +146 -0
  342. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -0
  343. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +5 -0
  344. package/dist/components/Employee/Dashboard/DashboardComponents.js +12 -0
  345. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -0
  346. package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +5 -0
  347. package/dist/components/Employee/Dashboard/DashboardFlow.js +25 -0
  348. package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -0
  349. package/dist/components/Employee/Dashboard/DocumentsView.d.ts +7 -0
  350. package/dist/components/Employee/Dashboard/DocumentsView.js +51 -0
  351. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -0
  352. package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +22 -0
  353. package/dist/components/Employee/Dashboard/JobAndPayView.js +211 -0
  354. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -0
  355. package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
  356. package/dist/components/Employee/Dashboard/TaxesView.js +97 -0
  357. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -0
  358. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
  359. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +8 -0
  360. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -0
  361. package/dist/components/Employee/Dashboard/hooks/index.d.ts +9 -0
  362. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +20 -0
  363. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +29 -0
  364. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -0
  365. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +30 -0
  366. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +52 -0
  367. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -0
  368. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +16 -0
  369. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +22 -0
  370. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -0
  371. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +20 -0
  372. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +24 -0
  373. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -0
  374. package/dist/components/Employee/Dashboard/index.d.ts +14 -0
  375. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +57 -53
  376. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  377. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +17 -18
  378. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  379. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  380. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -12
  381. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  382. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
  383. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  384. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -7
  385. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  386. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  387. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  388. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
  389. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  390. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
  391. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  392. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  393. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  394. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +22 -22
  395. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  396. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
  397. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  398. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +12 -14
  399. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  400. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
  401. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  402. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  403. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  404. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
  405. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  406. package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +3 -7
  407. package/dist/components/Employee/EmployeeList/EmployeeList.js +45 -95
  408. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  409. package/dist/components/Employee/EmployeeList/EmployeeListView.d.ts +15 -0
  410. package/dist/components/Employee/EmployeeList/EmployeeListView.js +130 -0
  411. package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +1 -0
  412. package/dist/components/Employee/EmployeeList/ManagementEmployeeList.d.ts +9 -0
  413. package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js +81 -0
  414. package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +1 -0
  415. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.d.ts +17 -0
  416. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js +193 -0
  417. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +1 -0
  418. package/dist/components/Employee/EmployeeList/index.d.ts +3 -0
  419. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +36 -23
  420. package/dist/components/Employee/EmployeeList/useEmployeeList.js +114 -19
  421. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  422. package/dist/components/Employee/FederalTaxes/Actions.js +7 -9
  423. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  424. package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -12
  425. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  426. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  427. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  428. package/dist/components/Employee/Landing/Landing.js +14 -15
  429. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  430. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +4 -4
  431. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  432. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
  433. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
  434. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  435. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +10 -11
  436. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  437. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  438. package/dist/components/Employee/PaymentMethod/Actions.js +6 -8
  439. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  440. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
  441. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  442. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -13
  443. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  444. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +44 -43
  445. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  446. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
  447. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  448. package/dist/components/Employee/PaymentMethod/Split.js +9 -10
  449. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  450. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
  451. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  452. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  453. package/dist/components/Employee/Profile/Actions.js +7 -9
  454. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  455. package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -16
  456. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  457. package/dist/components/Employee/Profile/HomeAddress.js +9 -10
  458. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  459. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -12
  460. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  461. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  462. package/dist/components/Employee/Profile/useProfile.js +3 -4
  463. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  464. package/dist/components/Employee/StateTaxes/Actions.js +8 -10
  465. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  466. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  467. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  468. package/dist/components/Employee/Taxes/Actions.js +8 -10
  469. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  470. package/dist/components/Employee/Taxes/FederalForm.js +10 -12
  471. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  472. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  473. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  474. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +48 -48
  475. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  476. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -17
  477. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  478. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -0
  479. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +37 -33
  480. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  481. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +1 -0
  482. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +57 -45
  483. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
  484. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +8 -11
  485. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  486. package/dist/components/Employee/index.d.ts +3 -0
  487. package/dist/components/Employee/index.js +38 -34
  488. package/dist/components/Employee/index.js.map +1 -1
  489. package/dist/components/Flow/Flow.js +20 -23
  490. package/dist/components/Flow/Flow.js.map +1 -1
  491. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
  492. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  493. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
  494. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  495. package/dist/components/InformationRequests/InformationRequests.js +3 -4
  496. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  497. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  498. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
  499. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  500. package/dist/components/Payroll/Dismissal/DismissalFlow.js +14 -14
  501. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
  502. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +2 -2
  503. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +21 -20
  504. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
  505. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +2 -1
  506. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +57 -55
  507. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
  508. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -11
  509. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  510. package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -1
  511. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +85 -74
  512. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  513. package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +7 -7
  514. package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +0 -1
  515. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
  516. package/dist/components/Payroll/OffCycle/OffCycleFlow.js +24 -18
  517. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  518. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +2 -0
  519. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +28 -22
  520. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  521. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +92 -84
  522. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  523. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
  524. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  525. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +17 -24
  526. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  527. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
  528. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +21 -21
  529. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
  530. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
  531. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
  532. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
  533. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -8
  534. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  535. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -13
  536. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  537. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
  538. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  539. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  540. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +194 -190
  541. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  542. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
  543. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +69 -69
  544. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  545. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +4 -3
  546. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +102 -76
  547. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  548. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -2
  549. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +235 -238
  550. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  551. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +7 -7
  552. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +11 -0
  553. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +63 -30
  554. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  555. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +2 -1
  556. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +43 -41
  557. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  558. package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +1 -1
  559. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +1 -1
  560. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +62 -51
  561. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  562. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +13 -6
  563. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -1
  564. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +22 -20
  565. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
  566. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  567. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  568. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +35 -14
  569. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
  570. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +80 -69
  571. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  572. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -1
  573. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +59 -66
  574. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  575. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +5 -4
  576. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +97 -105
  577. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  578. package/dist/components/Payroll/PayrollList/PayrollList.js +98 -64
  579. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  580. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +11 -3
  581. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +225 -123
  582. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  583. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +10 -8
  584. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  585. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +106 -105
  586. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  587. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  588. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +222 -213
  589. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  590. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
  591. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
  592. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  593. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +103 -114
  594. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  595. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +16 -18
  596. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -1
  597. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
  598. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  599. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
  600. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  601. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
  602. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  603. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +1 -1
  604. package/dist/components/Payroll/Transition/TransitionFlow.js +29 -27
  605. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  606. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -0
  607. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  608. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
  609. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  610. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +12 -14
  611. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  612. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
  613. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
  614. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
  615. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +13 -13
  616. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  617. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +44 -55
  618. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
  619. package/dist/components/Payroll/helpers.d.ts +6 -1
  620. package/dist/components/Payroll/helpers.js +81 -74
  621. package/dist/components/Payroll/helpers.js.map +1 -1
  622. package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
  623. package/dist/components/Payroll/usePreparedPayrollData.js +7 -8
  624. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  625. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +2 -2
  626. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +6 -9
  627. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -1
  628. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +1 -1
  629. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -1
  630. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +1 -2
  631. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -1
  632. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.d.ts +48 -0
  633. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js +94 -0
  634. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +1 -0
  635. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +3 -2
  636. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +24 -23
  637. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
  638. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +3 -2
  639. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +22 -17
  640. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -1
  641. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +3 -2
  642. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +31 -30
  643. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
  644. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +3 -2
  645. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +27 -26
  646. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
  647. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +3 -2
  648. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +28 -27
  649. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
  650. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +3 -2
  651. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +24 -23
  652. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
  653. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +5 -4
  654. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +28 -27
  655. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
  656. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +1 -1
  657. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -1
  658. package/dist/components/UNSTABLE_Hooks/form/index.d.ts +5 -5
  659. package/dist/components/UNSTABLE_Hooks/form/preprocessors.d.ts +3 -0
  660. package/dist/components/UNSTABLE_Hooks/form/preprocessors.js +15 -0
  661. package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +1 -0
  662. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +4 -0
  663. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +14 -0
  664. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -0
  665. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.d.ts +17 -0
  666. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +21 -0
  667. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +1 -0
  668. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +1 -1
  669. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +8 -8
  670. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
  671. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +22 -0
  672. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js +11 -0
  673. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -0
  674. package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +1 -1
  675. package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -1
  676. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +3 -5
  677. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -1
  678. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +48 -42
  679. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +48 -79
  680. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
  681. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +2 -2
  682. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -1
  683. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +2 -2
  684. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +13 -15
  685. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +109 -110
  686. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
  687. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +16 -18
  688. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -1
  689. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
  690. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +31 -25
  691. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
  692. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +5 -4
  693. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +27 -27
  694. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -1
  695. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +1 -1
  696. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +8 -22
  697. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +81 -84
  698. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
  699. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.d.ts +5 -0
  700. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js +172 -0
  701. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js.map +1 -0
  702. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js +14 -0
  703. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js.map +1 -0
  704. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.d.ts +23 -0
  705. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js +37 -0
  706. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js.map +1 -0
  707. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/index.d.ts +7 -0
  708. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.d.ts +55 -0
  709. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js +54 -0
  710. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js.map +1 -0
  711. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.d.ts +69 -0
  712. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js +180 -0
  713. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
  714. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.d.ts +5 -0
  715. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js +69 -0
  716. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js.map +1 -0
  717. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.d.ts +9 -0
  718. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js +14 -0
  719. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js.map +1 -0
  720. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/index.d.ts +7 -0
  721. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.d.ts +25 -0
  722. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js +24 -0
  723. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
  724. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.d.ts +57 -0
  725. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js +101 -0
  726. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
  727. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.d.ts +5 -0
  728. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js +71 -0
  729. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js.map +1 -0
  730. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.d.ts +5 -0
  731. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js +179 -0
  732. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js.map +1 -0
  733. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.d.ts +53 -0
  734. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js +164 -0
  735. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js.map +1 -0
  736. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/index.d.ts +9 -0
  737. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.d.ts +150 -0
  738. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js +152 -0
  739. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  740. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.d.ts +151 -0
  741. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js +172 -0
  742. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  743. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +15 -17
  744. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -1
  745. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +1 -1
  746. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -1
  747. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +1 -1
  748. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +9 -10
  749. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +85 -83
  750. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  751. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +8 -4
  752. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +18 -17
  753. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -1
  754. package/dist/components/UNSTABLE_Hooks/index.d.ts +10 -7
  755. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +5 -0
  756. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +46 -0
  757. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
  758. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +5 -0
  759. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +46 -0
  760. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
  761. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +5 -0
  762. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +49 -0
  763. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
  764. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +2 -0
  765. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +55 -0
  766. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
  767. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +25 -0
  768. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +5 -0
  769. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +73 -0
  770. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -0
  771. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
  772. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +122 -0
  773. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
  774. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
  775. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
  776. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
  777. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.d.ts +5 -0
  778. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +46 -0
  779. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +1 -0
  780. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +7 -0
  781. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +29 -0
  782. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -0
  783. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +2 -0
  784. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +66 -0
  785. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
  786. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +6 -0
  787. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.d.ts +2 -0
  788. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js +25 -0
  789. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
  790. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +29 -0
  791. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +103 -0
  792. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
  793. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/index.d.ts +3 -0
  794. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +14 -0
  795. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +290 -0
  796. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
  797. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts +1 -0
  798. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +8 -0
  799. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +71 -0
  800. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
  801. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +12 -0
  802. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +1 -0
  803. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +2 -0
  804. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +206 -0
  805. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
  806. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +20 -0
  807. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +6 -0
  808. package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +5 -0
  809. package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +35 -0
  810. package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
  811. package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +5 -0
  812. package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +35 -0
  813. package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
  814. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +5 -0
  815. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +35 -0
  816. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +1 -0
  817. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +5 -0
  818. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +35 -0
  819. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +1 -0
  820. package/dist/components/UNSTABLE_TimeOff/index.d.ts +25 -0
  821. package/dist/components/UNSTABLE_TimeOff/index.js +27 -0
  822. package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -0
  823. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
  824. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +26 -0
  825. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/index.d.ts +4 -0
  826. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.d.ts +30 -0
  827. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js +97 -0
  828. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +1 -0
  829. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts +1 -0
  830. package/dist/components/index.d.ts +1 -0
  831. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +66 -62
  832. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  833. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  834. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +10 -0
  835. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +28 -21
  836. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  837. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +4 -0
  838. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  839. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -12
  840. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  841. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +10 -2
  842. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
  843. package/dist/contexts/ThemeProvider/theme.d.ts +2 -0
  844. package/dist/contexts/ThemeProvider/theme.js +4 -2
  845. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  846. package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
  847. package/dist/helpers/breadcrumbHelpers.d.ts +14 -0
  848. package/dist/helpers/breadcrumbHelpers.js +35 -26
  849. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  850. package/dist/helpers/buildQueryErrorHandling.d.ts +22 -0
  851. package/dist/helpers/buildQueryErrorHandling.js +11 -0
  852. package/dist/helpers/buildQueryErrorHandling.js.map +1 -0
  853. package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.d.ts +1 -1
  854. package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.js +1 -1
  855. package/dist/helpers/collectErrors.js.map +1 -0
  856. package/dist/helpers/dateFormatting.d.ts +2 -0
  857. package/dist/helpers/dateFormatting.js +38 -33
  858. package/dist/helpers/dateFormatting.js.map +1 -1
  859. package/dist/helpers/formattedStrings.js +40 -33
  860. package/dist/helpers/formattedStrings.js.map +1 -1
  861. package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
  862. package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
  863. package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
  864. package/dist/hooks/useCompanyPaymentSpeed.test.d.ts +1 -0
  865. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +20 -0
  866. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +38 -0
  867. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -0
  868. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.test.d.ts +1 -0
  869. package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.d.ts +2 -2
  870. package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.js +1 -1
  871. package/dist/hooks/useErrorHandling.js.map +1 -0
  872. package/dist/hooks/useErrorHandling.test.d.ts +1 -0
  873. package/dist/hooks/usePagination/usePagination.d.ts +2 -0
  874. package/dist/hooks/usePagination/usePagination.js +32 -29
  875. package/dist/hooks/usePagination/usePagination.js.map +1 -1
  876. package/dist/i18n/I18n.js +21 -21
  877. package/dist/i18n/I18n.js.map +1 -1
  878. package/dist/i18n/en/Company.PaySchedule.json.js +6 -6
  879. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +24 -0
  880. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -0
  881. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +32 -0
  882. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -0
  883. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +28 -0
  884. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -0
  885. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
  886. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
  887. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +38 -0
  888. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -0
  889. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +52 -0
  890. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -0
  891. package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js +21 -0
  892. package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js.map +1 -0
  893. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -34
  894. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  895. package/dist/i18n/en/Employee.Dashboard.json.js +26 -0
  896. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -0
  897. package/dist/i18n/en/Employee.EmployeeList.json.js +22 -20
  898. package/dist/i18n/en/Employee.EmployeeList.json.js.map +1 -1
  899. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +40 -0
  900. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -0
  901. package/dist/i18n/en/Payroll.GrossUpModal.json.js +16 -14
  902. package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
  903. package/dist/i18n/en/Payroll.OffCycle.json.js +1 -1
  904. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
  905. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +5 -5
  906. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +38 -34
  907. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  908. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -25
  909. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  910. package/dist/i18n/en/Payroll.PayrollHistory.json.js +12 -12
  911. package/dist/i18n/en/Payroll.PayrollList.json.js +30 -22
  912. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  913. package/dist/i18n/en/Payroll.PayrollOverview.json.js +64 -58
  914. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  915. package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
  916. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +8 -8
  917. package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js +24 -0
  918. package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js.map +1 -0
  919. package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js +20 -0
  920. package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js.map +1 -0
  921. package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js +22 -0
  922. package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js.map +1 -0
  923. package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js +70 -0
  924. package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js.map +1 -0
  925. package/dist/i18n/en/common.json.d.ts +3 -1
  926. package/dist/i18n/en/common.json.js +5 -5
  927. package/dist/index.js +18 -16
  928. package/dist/index.js.map +1 -1
  929. package/dist/shared/constants.d.ts +56 -0
  930. package/dist/shared/constants.js +100 -70
  931. package/dist/shared/constants.js.map +1 -1
  932. package/dist/style.css +1 -1
  933. package/dist/types/i18next.d.ts +817 -12
  934. package/dist/{components/UNSTABLE_Hooks/types.d.ts → types/sdkHooks.d.ts} +29 -5
  935. package/docs/reference/endpoint-inventory.json +659 -391
  936. package/package.json +33 -24
  937. package/dist/components/Employee/EmployeeList/Actions.d.ts +0 -1
  938. package/dist/components/Employee/EmployeeList/Actions.js +0 -16
  939. package/dist/components/Employee/EmployeeList/Actions.js.map +0 -1
  940. package/dist/components/Employee/EmployeeList/Head.d.ts +0 -1
  941. package/dist/components/Employee/EmployeeList/Head.js +0 -15
  942. package/dist/components/Employee/EmployeeList/Head.js.map +0 -1
  943. package/dist/components/Employee/EmployeeList/List.d.ts +0 -2
  944. package/dist/components/Employee/EmployeeList/List.js +0 -125
  945. package/dist/components/Employee/EmployeeList/List.js.map +0 -1
  946. package/dist/components/Employee/EmployeeList/List.module.scss.js +0 -8
  947. package/dist/components/Employee/EmployeeList/List.module.scss.js.map +0 -1
  948. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js +0 -8
  949. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js.map +0 -1
  950. package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +0 -1
  951. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +0 -26
  952. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
  953. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
  954. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +0 -3
  955. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +0 -14
  956. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +0 -1
  957. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +0 -6
  958. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
  959. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
  960. package/dist/components/UNSTABLE_Hooks/form/types.d.ts +0 -27
  961. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
  962. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -9
  963. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
  964. package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +0 -1
  965. package/dist/helpers/requiredIf.d.ts +0 -13
  966. package/dist/helpers/requiredIf.js +0 -8
  967. package/dist/helpers/requiredIf.js.map +0 -1
  968. /package/dist/components/UNSTABLE_Hooks/form/{deriveFieldsMetadata.test.d.ts → buildFormSchema.test.d.ts} +0 -0
  969. /package/dist/components/UNSTABLE_Hooks/{useErrorHandling.test.d.ts → hooks/useCompensationForm/compensationSchemaParity.test.d.ts} +0 -0
@@ -1,6 +1,7 @@
1
1
  import { ContractorPaymentGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentgrouppreview';
2
2
  import { Contractor } from '@gusto/embedded-api/models/components/contractor';
3
3
  import { CompanyBankAccount } from '@gusto/embedded-api/models/components/companybankaccount';
4
+ import { PaymentSpeed } from '@gusto/embedded-api/models/components/paymentconfigs';
4
5
  interface PreviewPresentationProps {
5
6
  contractorPaymentGroup: ContractorPaymentGroupPreview;
6
7
  contractors: Contractor[];
@@ -10,7 +11,7 @@ interface PreviewPresentationProps {
10
11
  bankAccount?: CompanyBankAccount;
11
12
  selectedUnblockOptions?: Record<string, string>;
12
13
  onUnblockOptionChange?: (blockerType: string, value: string) => void;
13
- paymentSpeed?: string;
14
+ paymentSpeed?: PaymentSpeed;
14
15
  }
15
16
  export declare const PreviewPresentation: ({ contractorPaymentGroup, contractors, onBackToEdit, onSubmit, isLoading, bankAccount, selectedUnblockOptions, onUnblockOptionChange, paymentSpeed, }: PreviewPresentationProps) => import("react/jsx-runtime").JSX.Element;
16
17
  export {};
@@ -1,176 +1,175 @@
1
- import { jsxs as m, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as C } from "react-i18next";
3
3
  import { useMemo as v } from "react";
4
4
  import { getContractorDisplayName as R } from "./helpers.js";
5
5
  import { FastAchSubmissionBlockerBanner as L } from "./FastAchSubmissionBlockerBanner.js";
6
6
  import { GenericBlocker as P } from "./GenericBlocker.js";
7
- import { Flex as u } from "../../../Common/Flex/Flex.js";
8
- import "classnames";
9
- import { PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES as T } from "../../../../shared/constants.js";
7
+ import { Flex as l } from "../../../Common/Flex/Flex.js";
10
8
  import { useComponentContext as _ } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
9
  import { useI18n as E } from "../../../../i18n/I18n.js";
12
10
  import { formatHoursDisplay as F } from "../../../Payroll/helpers.js";
13
11
  import j from "../../../../hooks/useNumberFormatter.js";
12
+ import { PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES as T } from "../../../../shared/constants.js";
14
13
  import { DataView as p } from "../../../Common/DataView/DataView.js";
15
- const I = "0.000", G = ({
16
- contractorPaymentGroup: i,
14
+ const I = "0.000", X = ({
15
+ contractorPaymentGroup: a,
17
16
  contractors: f,
18
- onBackToEdit: A,
19
- onSubmit: g,
20
- isLoading: d,
21
- bankAccount: w,
22
- selectedUnblockOptions: c = {},
17
+ onBackToEdit: h,
18
+ onSubmit: A,
19
+ isLoading: u,
20
+ bankAccount: g,
21
+ selectedUnblockOptions: d = {},
23
22
  onUnblockOptionChange: b,
24
23
  paymentSpeed: D
25
24
  }) => {
26
- const { Button: h, Text: n, Heading: y, Alert: H } = _();
25
+ const { Button: c, Text: w, Heading: y, Alert: H } = _();
27
26
  E("Contractor.Payments.CreatePayment");
28
- const { t: r } = C("Contractor.Payments.CreatePayment", {
27
+ const { t } = C("Contractor.Payments.CreatePayment", {
29
28
  keyPrefix: "previewPresentation"
30
- }), o = j(), N = (e) => e.wageType === "Hourly" && e.hourlyRate ? `${r("wageTypes.hourly")} ${o(Number(e.hourlyRate || "0"))}${r("perHour")}` : e.wageType, s = v(
31
- () => i.contractorPayments?.reduce(
32
- (e, a) => (e.wageAmount += Number(a.wage || "0"), e.bonusAmount += Number(a.bonus || "0"), e.reimbursementAmount += Number(a.reimbursement || "0"), e.totalAmount += Number(a.wageTotal || "0"), e),
29
+ }), n = j(), N = (e) => e.wageType === "Hourly" && e.hourlyRate ? `${t("wageTypes.hourly")} ${n(Number(e.hourlyRate || "0"))}${t("perHour")}` : e.wageType, m = v(
30
+ () => a.contractorPayments?.reduce(
31
+ (e, r) => (e.wageAmount += Number(r.wage || "0"), e.bonusAmount += Number(r.bonus || "0"), e.reimbursementAmount += Number(r.reimbursement || "0"), e.totalAmount += Number(r.wageTotal || "0"), e),
33
32
  { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 }
34
33
  ),
35
- [i.contractorPayments]
36
- ), B = i.contractorPayments || [], l = (i.submissionBlockers || []).filter(
34
+ [a.contractorPayments]
35
+ ), B = a.contractorPayments || [], s = (a.submissionBlockers || []).filter(
37
36
  (e) => e.status === "unresolved"
38
- ), S = l.some(
37
+ ), S = s.some(
39
38
  (e) => !T.includes(e.blockerType || "")
40
- ), k = l.some(
41
- (e) => !c[e.blockerType || ""]
42
- ), x = d || l.length > 0 && (S || k);
43
- return /* @__PURE__ */ m(u, { flexDirection: "column", gap: 32, children: [
44
- /* @__PURE__ */ m(u, { justifyContent: "flex-end", gap: 16, children: [
45
- /* @__PURE__ */ m(u, { flexDirection: "column", gap: 2, children: [
46
- /* @__PURE__ */ t(y, { as: "h2", children: r("reviewAndSubmitTitle") }),
47
- /* @__PURE__ */ t(n, { variant: "supporting", children: r("reviewSubtitle", { debitDate: i.debitDate }) })
39
+ ), k = s.some(
40
+ (e) => !d[e.blockerType || ""]
41
+ ), x = u || s.length > 0 && (S || k);
42
+ return /* @__PURE__ */ i(l, { flexDirection: "column", gap: 32, children: [
43
+ /* @__PURE__ */ i(l, { justifyContent: "flex-end", gap: 16, children: [
44
+ /* @__PURE__ */ i(l, { flexDirection: "column", gap: 2, children: [
45
+ /* @__PURE__ */ o(y, { as: "h2", children: t("reviewAndSubmitTitle") }),
46
+ /* @__PURE__ */ o(w, { variant: "supporting", children: t("reviewSubtitle", { debitDate: a.debitDate }) })
48
47
  ] }),
49
- /* @__PURE__ */ m(u, { justifyContent: "flex-end", gap: 16, children: [
50
- /* @__PURE__ */ t(h, { onClick: A, variant: "secondary", children: r("editButton") }),
51
- /* @__PURE__ */ t(
52
- h,
48
+ /* @__PURE__ */ i(l, { justifyContent: "flex-end", gap: 16, children: [
49
+ /* @__PURE__ */ o(c, { onClick: h, variant: "secondary", children: t("editButton") }),
50
+ /* @__PURE__ */ o(
51
+ c,
53
52
  {
54
- onClick: g,
53
+ onClick: A,
55
54
  variant: "primary",
56
- isLoading: d,
55
+ isLoading: u,
57
56
  isDisabled: x,
58
- children: r("submitButton")
57
+ children: t("submitButton")
59
58
  }
60
59
  )
61
60
  ] })
62
61
  ] }),
63
- /* @__PURE__ */ t(
62
+ /* @__PURE__ */ o(
64
63
  H,
65
64
  {
66
65
  status: "info",
67
- label: r("alerts.submitPaymentsDeadline", {
68
- checkDate: i.checkDate,
69
- debitDate: i.debitDate
66
+ label: t("alerts.submitPaymentsDeadline", {
67
+ checkDate: a.checkDate,
68
+ debitDate: a.debitDate
70
69
  })
71
70
  }
72
71
  ),
73
- l.length > 0 && b && l.map((e) => {
74
- const a = e.blockerType || "";
75
- return T.includes(a) ? /* @__PURE__ */ t(
72
+ s.length > 0 && b && s.map((e) => {
73
+ const r = e.blockerType || "";
74
+ return T.includes(r) ? /* @__PURE__ */ o(
76
75
  L,
77
76
  {
78
77
  blocker: e,
79
- selectedValue: c[a],
78
+ selectedValue: d[r],
80
79
  onUnblockOptionChange: b,
81
80
  paymentSpeed: D
82
81
  },
83
- a
84
- ) : /* @__PURE__ */ t(P, { blocker: e }, a);
82
+ r
83
+ ) : /* @__PURE__ */ o(P, { blocker: e }, r);
85
84
  }),
86
- /* @__PURE__ */ t(y, { as: "h3", children: r("paymentSummaryTitle") }),
87
- /* @__PURE__ */ t(
85
+ /* @__PURE__ */ o(y, { as: "h3", children: t("paymentSummaryTitle") }),
86
+ /* @__PURE__ */ o(
88
87
  p,
89
88
  {
90
89
  columns: [
91
90
  {
92
- title: r("summaryTableHeaders.totalAmount"),
93
- render: () => /* @__PURE__ */ t(n, { children: o(Number(i.totals?.amount || "0")) })
91
+ title: t("summaryTableHeaders.totalAmount"),
92
+ render: () => n(Number(a.totals?.amount || "0"))
94
93
  },
95
94
  {
96
- title: r("summaryTableHeaders.debitAmount"),
97
- render: () => /* @__PURE__ */ t(n, { children: o(Number(i.totals?.debitAmount || "0")) })
95
+ title: t("summaryTableHeaders.debitAmount"),
96
+ render: () => n(Number(a.totals?.debitAmount || "0"))
98
97
  },
99
98
  {
100
- title: r("summaryTableHeaders.debitAccount"),
101
- render: () => /* @__PURE__ */ t(n, { children: w?.hiddenAccountNumber ?? r("naDebitAccount") })
99
+ title: t("summaryTableHeaders.debitAccount"),
100
+ render: () => g?.hiddenAccountNumber ?? t("naDebitAccount")
102
101
  },
103
102
  {
104
- title: r("summaryTableHeaders.debitDate"),
105
- render: () => /* @__PURE__ */ t(n, { children: i.debitDate || "debitDate" })
103
+ title: t("summaryTableHeaders.debitDate"),
104
+ render: () => a.debitDate || "debitDate"
106
105
  },
107
106
  {
108
- title: r("summaryTableHeaders.contractorPayDate"),
109
- render: () => /* @__PURE__ */ t(n, { children: i.checkDate || "contractorPayDate" })
107
+ title: t("summaryTableHeaders.contractorPayDate"),
108
+ render: () => a.checkDate || "contractorPayDate"
110
109
  }
111
110
  ],
112
- data: [i],
111
+ data: [a],
113
112
  label: "Payment Summary"
114
113
  }
115
114
  ),
116
- /* @__PURE__ */ t(
115
+ /* @__PURE__ */ o(
117
116
  p,
118
117
  {
119
118
  columns: [
120
119
  {
121
- title: r("contractorTableHeaders.contractor"),
122
- render: (e) => /* @__PURE__ */ t(n, { children: R(
120
+ title: t("contractorTableHeaders.contractor"),
121
+ render: (e) => R(
123
122
  f.find(
124
- (a) => a.uuid === e.contractorUuid
123
+ (r) => r.uuid === e.contractorUuid
125
124
  )
126
- ) })
125
+ )
127
126
  },
128
127
  {
129
- title: r("contractorTableHeaders.wageType"),
130
- render: (e) => /* @__PURE__ */ t(n, { children: N(e) })
128
+ title: t("contractorTableHeaders.wageType"),
129
+ render: (e) => N(e)
131
130
  },
132
131
  {
133
- title: r("contractorTableHeaders.paymentMethod"),
134
- render: (e) => /* @__PURE__ */ t(n, { children: e.paymentMethod || "N/A" })
132
+ title: t("contractorTableHeaders.paymentMethod"),
133
+ render: (e) => e.paymentMethod || "N/A"
135
134
  },
136
135
  {
137
- title: r("contractorTableHeaders.hours"),
136
+ title: t("contractorTableHeaders.hours"),
138
137
  render: (e) => {
139
- const a = Number(e.hours || "0");
140
- return /* @__PURE__ */ t(n, { children: e.wageType === "Hourly" && a ? F(a) : I });
138
+ const r = Number(e.hours || "0");
139
+ return e.wageType === "Hourly" && r ? F(r) : I;
141
140
  }
142
141
  },
143
142
  {
144
- title: r("contractorTableHeaders.wage"),
145
- render: (e) => /* @__PURE__ */ t(n, { children: e.wageType === "Fixed" && e.wage ? o(Number(e.wage || "0")) : o(0) })
143
+ title: t("contractorTableHeaders.wage"),
144
+ render: (e) => e.wageType === "Fixed" && e.wage ? n(Number(e.wage || "0")) : n(0)
146
145
  },
147
146
  {
148
- title: r("contractorTableHeaders.bonus"),
149
- render: (e) => /* @__PURE__ */ t(n, { children: o(Number(e.bonus || "0")) })
147
+ title: t("contractorTableHeaders.bonus"),
148
+ render: (e) => n(Number(e.bonus || "0"))
150
149
  },
151
150
  {
152
- title: r("contractorTableHeaders.reimbursement"),
153
- render: (e) => /* @__PURE__ */ t(n, { children: o(Number(e.reimbursement || "0")) })
151
+ title: t("contractorTableHeaders.reimbursement"),
152
+ render: (e) => n(Number(e.reimbursement || "0"))
154
153
  },
155
154
  {
156
- title: r("contractorTableHeaders.total"),
157
- render: (e) => /* @__PURE__ */ t(n, { children: o(Number(e.wageTotal || "0")) })
155
+ title: t("contractorTableHeaders.total"),
156
+ render: (e) => n(Number(e.wageTotal || "0"))
158
157
  }
159
158
  ],
160
159
  data: B,
161
160
  footer: () => ({
162
- "column-0": /* @__PURE__ */ t(n, { weight: "bold", children: r("totalsLabel") }),
163
- "column-4": /* @__PURE__ */ t(n, { children: o(s?.wageAmount ?? 0) }),
164
- "column-5": /* @__PURE__ */ t(n, { children: o(s?.bonusAmount ?? 0) }),
165
- "column-6": /* @__PURE__ */ t(n, { children: o(s?.reimbursementAmount ?? 0) }),
166
- "column-7": /* @__PURE__ */ t(n, { children: o(s?.totalAmount ?? 0) })
161
+ "column-0": t("totalsLabel"),
162
+ "column-4": n(m?.wageAmount ?? 0),
163
+ "column-5": n(m?.bonusAmount ?? 0),
164
+ "column-6": n(m?.reimbursementAmount ?? 0),
165
+ "column-7": n(m?.totalAmount ?? 0)
167
166
  }),
168
- label: r("whatYourCompanyPays")
167
+ label: t("whatYourCompanyPays")
169
168
  }
170
169
  )
171
170
  ] });
172
171
  };
173
172
  export {
174
- G as PreviewPresentation
173
+ X as PreviewPresentation
175
174
  };
176
175
  //# sourceMappingURL=PreviewPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewPresentation.js","sources":["../../../../../src/components/Contractor/Payments/CreatePayment/PreviewPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { ContractorPaymentGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentgrouppreview'\nimport type { ContractorPaymentForGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentforgrouppreview'\nimport { useMemo } from 'react'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport type { CompanyBankAccount } from '@gusto/embedded-api/models/components/companybankaccount'\nimport { getContractorDisplayName } from './helpers'\nimport { FastAchSubmissionBlockerBanner } from './FastAchSubmissionBlockerBanner'\nimport { GenericBlocker } from './GenericBlocker'\nimport { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES } from '@/shared/constants'\n\nconst ZERO_HOURS_DISPLAY = '0.000'\n\ninterface PreviewPresentationProps {\n contractorPaymentGroup: ContractorPaymentGroupPreview\n contractors: Contractor[]\n onBackToEdit: () => void\n onSubmit: () => void\n isLoading: boolean\n bankAccount?: CompanyBankAccount\n selectedUnblockOptions?: Record<string, string>\n onUnblockOptionChange?: (blockerType: string, value: string) => void\n paymentSpeed?: string\n}\n\nexport const PreviewPresentation = ({\n contractorPaymentGroup,\n contractors,\n onBackToEdit,\n onSubmit,\n isLoading,\n bankAccount,\n selectedUnblockOptions = {},\n onUnblockOptionChange,\n paymentSpeed,\n}: PreviewPresentationProps) => {\n const { Button, Text, Heading, Alert } = useComponentContext()\n useI18n('Contractor.Payments.CreatePayment')\n const { t } = useTranslation('Contractor.Payments.CreatePayment', {\n keyPrefix: 'previewPresentation',\n })\n const currencyFormatter = useNumberFormatter()\n\n const formatWageType = (contractor: ContractorPaymentForGroupPreview) => {\n if (contractor.wageType === 'Hourly' && contractor.hourlyRate) {\n return `${t('wageTypes.hourly')} ${currencyFormatter(Number(contractor.hourlyRate || '0'))}${t('perHour')}`\n }\n return contractor.wageType\n }\n\n const totals = useMemo(\n () =>\n contractorPaymentGroup.contractorPayments?.reduce(\n (acc, contractor) => {\n acc.wageAmount += Number(contractor.wage || '0')\n acc.bonusAmount += Number(contractor.bonus || '0')\n acc.reimbursementAmount += Number(contractor.reimbursement || '0')\n acc.totalAmount += Number(contractor.wageTotal || '0')\n return acc\n },\n { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 },\n ),\n [contractorPaymentGroup.contractorPayments],\n )\n\n const contractorPayments = contractorPaymentGroup.contractorPayments || []\n\n const submissionBlockers = (contractorPaymentGroup.submissionBlockers || []).filter(\n blocker => blocker.status === 'unresolved',\n )\n\n const hasUnresolvableBlockers = submissionBlockers.some(\n blocker => !PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(blocker.blockerType || ''),\n )\n\n const hasUnselectedBlockers = submissionBlockers.some(\n blocker => !selectedUnblockOptions[blocker.blockerType || ''],\n )\n\n const isSubmitDisabled =\n isLoading ||\n (submissionBlockers.length > 0 && (hasUnresolvableBlockers || hasUnselectedBlockers))\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('reviewAndSubmitTitle')}</Heading>\n <Text variant=\"supporting\">\n {t('reviewSubtitle', { debitDate: contractorPaymentGroup.debitDate })}\n </Text>\n </Flex>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Button onClick={onBackToEdit} variant=\"secondary\">\n {t('editButton')}\n </Button>\n <Button\n onClick={onSubmit}\n variant=\"primary\"\n isLoading={isLoading}\n isDisabled={isSubmitDisabled}\n >\n {t('submitButton')}\n </Button>\n </Flex>\n </Flex>\n\n <Alert\n status=\"info\"\n label={t('alerts.submitPaymentsDeadline', {\n checkDate: contractorPaymentGroup.checkDate,\n debitDate: contractorPaymentGroup.debitDate,\n })}\n />\n\n {submissionBlockers.length > 0 &&\n onUnblockOptionChange &&\n submissionBlockers.map(blocker => {\n const blockerType = blocker.blockerType || ''\n\n if (PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(blockerType)) {\n return (\n <FastAchSubmissionBlockerBanner\n key={blockerType}\n blocker={blocker}\n selectedValue={selectedUnblockOptions[blockerType]}\n onUnblockOptionChange={onUnblockOptionChange}\n paymentSpeed={paymentSpeed}\n />\n )\n }\n\n return <GenericBlocker key={blockerType} blocker={blocker} />\n })}\n\n {/* Payment Summary */}\n <Heading as=\"h3\">{t('paymentSummaryTitle')}</Heading>\n <DataView\n columns={[\n {\n title: t('summaryTableHeaders.totalAmount'),\n render: () => (\n <Text>{currencyFormatter(Number(contractorPaymentGroup.totals?.amount || '0'))}</Text>\n ),\n },\n {\n title: t('summaryTableHeaders.debitAmount'),\n render: () => (\n <Text>\n {currencyFormatter(Number(contractorPaymentGroup.totals?.debitAmount || '0'))}\n </Text>\n ),\n },\n {\n title: t('summaryTableHeaders.debitAccount'),\n render: () => <Text>{bankAccount?.hiddenAccountNumber ?? t('naDebitAccount')}</Text>,\n },\n {\n title: t('summaryTableHeaders.debitDate'),\n render: () => <Text>{contractorPaymentGroup.debitDate || 'debitDate'}</Text>,\n },\n {\n title: t('summaryTableHeaders.contractorPayDate'),\n render: () => <Text>{contractorPaymentGroup.checkDate || 'contractorPayDate'}</Text>,\n },\n ]}\n data={[contractorPaymentGroup]}\n label=\"Payment Summary\"\n />\n\n {/* Contractor Payments Table */}\n <DataView\n columns={[\n {\n title: t('contractorTableHeaders.contractor'),\n render: contractorPayment => (\n <Text>\n {getContractorDisplayName(\n contractors.find(\n contractor => contractor.uuid === contractorPayment.contractorUuid,\n ),\n )}\n </Text>\n ),\n },\n {\n title: t('contractorTableHeaders.wageType'),\n render: contractorPayment => <Text>{formatWageType(contractorPayment)}</Text>,\n },\n {\n title: t('contractorTableHeaders.paymentMethod'),\n render: contractorPayment => <Text>{contractorPayment.paymentMethod || 'N/A'}</Text>,\n },\n {\n title: t('contractorTableHeaders.hours'),\n render: contractorPayment => {\n const hours = Number(contractorPayment.hours || '0')\n return (\n <Text>\n {contractorPayment.wageType === 'Hourly' && hours\n ? formatHoursDisplay(hours)\n : ZERO_HOURS_DISPLAY}\n </Text>\n )\n },\n },\n {\n title: t('contractorTableHeaders.wage'),\n render: contractorPayment => (\n <Text>\n {contractorPayment.wageType === 'Fixed' && contractorPayment.wage\n ? currencyFormatter(Number(contractorPayment.wage || '0'))\n : currencyFormatter(0)}\n </Text>\n ),\n },\n {\n title: t('contractorTableHeaders.bonus'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.bonus || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.reimbursement'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.reimbursement || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.total'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.wageTotal || '0'))}</Text>\n ),\n },\n ]}\n data={contractorPayments}\n footer={() => ({\n 'column-0': <Text weight=\"bold\">{t('totalsLabel')}</Text>,\n 'column-4': <Text>{currencyFormatter(totals?.wageAmount ?? 0)}</Text>,\n 'column-5': <Text>{currencyFormatter(totals?.bonusAmount ?? 0)}</Text>,\n 'column-6': <Text>{currencyFormatter(totals?.reimbursementAmount ?? 0)}</Text>,\n 'column-7': <Text>{currencyFormatter(totals?.totalAmount ?? 0)}</Text>,\n })}\n label={t('whatYourCompanyPays')}\n />\n </Flex>\n )\n}\n"],"names":["ZERO_HOURS_DISPLAY","PreviewPresentation","contractorPaymentGroup","contractors","onBackToEdit","onSubmit","isLoading","bankAccount","selectedUnblockOptions","onUnblockOptionChange","paymentSpeed","Button","Text","Heading","Alert","useComponentContext","useI18n","t","useTranslation","currencyFormatter","useNumberFormatter","formatWageType","contractor","totals","useMemo","acc","contractorPayments","submissionBlockers","blocker","hasUnresolvableBlockers","PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES","hasUnselectedBlockers","isSubmitDisabled","jsxs","Flex","jsx","blockerType","FastAchSubmissionBlockerBanner","GenericBlocker","DataView","contractorPayment","getContractorDisplayName","hours","formatHoursDisplay"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAMA,IAAqB,SAcdC,IAAsB,CAAC;AAAA,EAClC,wBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,wBAAAC,IAAyB,CAAA;AAAA,EACzB,uBAAAC;AAAA,EACA,cAAAC;AACF,MAAgC;AAC9B,QAAM,EAAE,QAAAC,GAAQ,MAAAC,GAAM,SAAAC,GAAS,OAAAC,EAAA,IAAUC,EAAA;AACzC,EAAAC,EAAQ,mCAAmC;AAC3C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qCAAqC;AAAA,IAChE,WAAW;AAAA,EAAA,CACZ,GACKC,IAAoBC,EAAA,GAEpBC,IAAiB,CAACC,MAClBA,EAAW,aAAa,YAAYA,EAAW,aAC1C,GAAGL,EAAE,kBAAkB,CAAC,IAAIE,EAAkB,OAAOG,EAAW,cAAc,GAAG,CAAC,CAAC,GAAGL,EAAE,SAAS,CAAC,KAEpGK,EAAW,UAGdC,IAASC;AAAA,IACb,MACEtB,EAAuB,oBAAoB;AAAA,MACzC,CAACuB,GAAKH,OACJG,EAAI,cAAc,OAAOH,EAAW,QAAQ,GAAG,GAC/CG,EAAI,eAAe,OAAOH,EAAW,SAAS,GAAG,GACjDG,EAAI,uBAAuB,OAAOH,EAAW,iBAAiB,GAAG,GACjEG,EAAI,eAAe,OAAOH,EAAW,aAAa,GAAG,GAC9CG;AAAA,MAET,EAAE,YAAY,GAAG,aAAa,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,YAAkBW,GAAQ,eAAe,CAAC,EAAA,CAAE;AAAA,QAAA;AAAA,QAEjE,OAAON,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,EAChC,GACF;AAEJ;"}
1
+ {"version":3,"file":"PreviewPresentation.js","sources":["../../../../../src/components/Contractor/Payments/CreatePayment/PreviewPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { ContractorPaymentGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentgrouppreview'\nimport type { ContractorPaymentForGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentforgrouppreview'\nimport { useMemo } from 'react'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport type { CompanyBankAccount } from '@gusto/embedded-api/models/components/companybankaccount'\nimport type { PaymentSpeed } from '@gusto/embedded-api/models/components/paymentconfigs'\nimport { getContractorDisplayName } from './helpers'\nimport { FastAchSubmissionBlockerBanner } from './FastAchSubmissionBlockerBanner'\nimport { GenericBlocker } from './GenericBlocker'\nimport { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES } from '@/shared/constants'\n\nconst ZERO_HOURS_DISPLAY = '0.000'\n\ninterface PreviewPresentationProps {\n contractorPaymentGroup: ContractorPaymentGroupPreview\n contractors: Contractor[]\n onBackToEdit: () => void\n onSubmit: () => void\n isLoading: boolean\n bankAccount?: CompanyBankAccount\n selectedUnblockOptions?: Record<string, string>\n onUnblockOptionChange?: (blockerType: string, value: string) => void\n paymentSpeed?: PaymentSpeed\n}\n\nexport const PreviewPresentation = ({\n contractorPaymentGroup,\n contractors,\n onBackToEdit,\n onSubmit,\n isLoading,\n bankAccount,\n selectedUnblockOptions = {},\n onUnblockOptionChange,\n paymentSpeed,\n}: PreviewPresentationProps) => {\n const { Button, Text, Heading, Alert } = useComponentContext()\n useI18n('Contractor.Payments.CreatePayment')\n const { t } = useTranslation('Contractor.Payments.CreatePayment', {\n keyPrefix: 'previewPresentation',\n })\n const currencyFormatter = useNumberFormatter()\n\n const formatWageType = (contractor: ContractorPaymentForGroupPreview) => {\n if (contractor.wageType === 'Hourly' && contractor.hourlyRate) {\n return `${t('wageTypes.hourly')} ${currencyFormatter(Number(contractor.hourlyRate || '0'))}${t('perHour')}`\n }\n return contractor.wageType\n }\n\n const totals = useMemo(\n () =>\n contractorPaymentGroup.contractorPayments?.reduce(\n (acc, contractor) => {\n acc.wageAmount += Number(contractor.wage || '0')\n acc.bonusAmount += Number(contractor.bonus || '0')\n acc.reimbursementAmount += Number(contractor.reimbursement || '0')\n acc.totalAmount += Number(contractor.wageTotal || '0')\n return acc\n },\n { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 },\n ),\n [contractorPaymentGroup.contractorPayments],\n )\n\n const contractorPayments = contractorPaymentGroup.contractorPayments || []\n\n const submissionBlockers = (contractorPaymentGroup.submissionBlockers || []).filter(\n blocker => blocker.status === 'unresolved',\n )\n\n const hasUnresolvableBlockers = submissionBlockers.some(\n blocker => !PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(blocker.blockerType || ''),\n )\n\n const hasUnselectedBlockers = submissionBlockers.some(\n blocker => !selectedUnblockOptions[blocker.blockerType || ''],\n )\n\n const isSubmitDisabled =\n isLoading ||\n (submissionBlockers.length > 0 && (hasUnresolvableBlockers || hasUnselectedBlockers))\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('reviewAndSubmitTitle')}</Heading>\n <Text variant=\"supporting\">\n {t('reviewSubtitle', { debitDate: contractorPaymentGroup.debitDate })}\n </Text>\n </Flex>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Button onClick={onBackToEdit} variant=\"secondary\">\n {t('editButton')}\n </Button>\n <Button\n onClick={onSubmit}\n variant=\"primary\"\n isLoading={isLoading}\n isDisabled={isSubmitDisabled}\n >\n {t('submitButton')}\n </Button>\n </Flex>\n </Flex>\n\n <Alert\n status=\"info\"\n label={t('alerts.submitPaymentsDeadline', {\n checkDate: contractorPaymentGroup.checkDate,\n debitDate: contractorPaymentGroup.debitDate,\n })}\n />\n\n {submissionBlockers.length > 0 &&\n onUnblockOptionChange &&\n submissionBlockers.map(blocker => {\n const blockerType = blocker.blockerType || ''\n\n if (PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(blockerType)) {\n return (\n <FastAchSubmissionBlockerBanner\n key={blockerType}\n blocker={blocker}\n selectedValue={selectedUnblockOptions[blockerType]}\n onUnblockOptionChange={onUnblockOptionChange}\n paymentSpeed={paymentSpeed}\n />\n )\n }\n\n return <GenericBlocker key={blockerType} blocker={blocker} />\n })}\n\n {/* Payment Summary */}\n <Heading as=\"h3\">{t('paymentSummaryTitle')}</Heading>\n <DataView\n columns={[\n {\n title: t('summaryTableHeaders.totalAmount'),\n render: () => currencyFormatter(Number(contractorPaymentGroup.totals?.amount || '0')),\n },\n {\n title: t('summaryTableHeaders.debitAmount'),\n render: () =>\n currencyFormatter(Number(contractorPaymentGroup.totals?.debitAmount || '0')),\n },\n {\n title: t('summaryTableHeaders.debitAccount'),\n render: () => bankAccount?.hiddenAccountNumber ?? t('naDebitAccount'),\n },\n {\n title: t('summaryTableHeaders.debitDate'),\n render: () => contractorPaymentGroup.debitDate || 'debitDate',\n },\n {\n title: t('summaryTableHeaders.contractorPayDate'),\n render: () => contractorPaymentGroup.checkDate || 'contractorPayDate',\n },\n ]}\n data={[contractorPaymentGroup]}\n label=\"Payment Summary\"\n />\n\n {/* Contractor Payments Table */}\n <DataView\n columns={[\n {\n title: t('contractorTableHeaders.contractor'),\n render: contractorPayment =>\n getContractorDisplayName(\n contractors.find(\n contractor => contractor.uuid === contractorPayment.contractorUuid,\n ),\n ),\n },\n {\n title: t('contractorTableHeaders.wageType'),\n render: contractorPayment => formatWageType(contractorPayment),\n },\n {\n title: t('contractorTableHeaders.paymentMethod'),\n render: contractorPayment => contractorPayment.paymentMethod || 'N/A',\n },\n {\n title: t('contractorTableHeaders.hours'),\n render: contractorPayment => {\n const hours = Number(contractorPayment.hours || '0')\n return contractorPayment.wageType === 'Hourly' && hours\n ? formatHoursDisplay(hours)\n : ZERO_HOURS_DISPLAY\n },\n },\n {\n title: t('contractorTableHeaders.wage'),\n render: contractorPayment =>\n contractorPayment.wageType === 'Fixed' && contractorPayment.wage\n ? currencyFormatter(Number(contractorPayment.wage || '0'))\n : currencyFormatter(0),\n },\n {\n title: t('contractorTableHeaders.bonus'),\n render: contractorPayment => currencyFormatter(Number(contractorPayment.bonus || '0')),\n },\n {\n title: t('contractorTableHeaders.reimbursement'),\n render: contractorPayment =>\n currencyFormatter(Number(contractorPayment.reimbursement || '0')),\n },\n {\n title: t('contractorTableHeaders.total'),\n render: contractorPayment =>\n currencyFormatter(Number(contractorPayment.wageTotal || '0')),\n },\n ]}\n data={contractorPayments}\n footer={() => ({\n 'column-0': t('totalsLabel'),\n 'column-4': currencyFormatter(totals?.wageAmount ?? 0),\n 'column-5': currencyFormatter(totals?.bonusAmount ?? 0),\n 'column-6': currencyFormatter(totals?.reimbursementAmount ?? 0),\n 'column-7': currencyFormatter(totals?.totalAmount ?? 0),\n })}\n label={t('whatYourCompanyPays')}\n />\n </Flex>\n )\n}\n"],"names":["ZERO_HOURS_DISPLAY","PreviewPresentation","contractorPaymentGroup","contractors","onBackToEdit","onSubmit","isLoading","bankAccount","selectedUnblockOptions","onUnblockOptionChange","paymentSpeed","Button","Text","Heading","Alert","useComponentContext","useI18n","useTranslation","currencyFormatter","useNumberFormatter","formatWageType","contractor","totals","useMemo","acc","contractorPayments","submissionBlockers","blocker","hasUnresolvableBlockers","PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES","hasUnselectedBlockers","isSubmitDisabled","jsxs","Flex","jsx","blockerType","FastAchSubmissionBlockerBanner","GenericBlocker","DataView","contractorPayment","getContractorDisplayName","hours","formatHoursDisplay"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMA,IAAqB,SAcdC,IAAsB,CAAC;AAAA,EAClC,wBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,wBAAAC,IAAyB,CAAA;AAAA,EACzB,uBAAAC;AAAA,EACA,cAAAC;AACF,MAAgC;AAC9B,QAAM,EAAE,QAAAC,GAAQ,MAAAC,GAAM,SAAAC,GAAS,OAAAC,EAAA,IAAUC,EAAA;AACzC,EAAAC,EAAQ,mCAAmC;AAC3C,QAAM,EAAE,EAAA,IAAMC,EAAe,qCAAqC;AAAA,IAChE,WAAW;AAAA,EAAA,CACZ,GACKC,IAAoBC,EAAA,GAEpBC,IAAiB,CAACC,MAClBA,EAAW,aAAa,YAAYA,EAAW,aAC1C,GAAG,EAAE,kBAAkB,CAAC,IAAIH,EAAkB,OAAOG,EAAW,cAAc,GAAG,CAAC,CAAC,GAAG,EAAE,SAAS,CAAC,KAEpGA,EAAW,UAGdC,IAASC;AAAA,IACb,MACErB,EAAuB,oBAAoB;AAAA,MACzC,CAACsB,GAAKH,OACJG,EAAI,cAAc,OAAOH,EAAW,QAAQ,GAAG,GAC/CG,EAAI,eAAe,OAAOH,EAAW,SAAS,GAAG,GACjDG,EAAI,uBAAuB,OAAOH,EAAW,iBAAiB,GAAG,GACjEG,EAAI,eAAe,OAAOH,EAAW,aAAa,GAAG,GAC9CG;AAAA,MAET,EAAE,YAAY,GAAG,aAAa,GAAG,qBAAqB,GAAG,aAAa,EAAA;AAAA,IAAE;AAAA,IAE5E,CAACtB,EAAuB,kBAAkB;AAAA,EAAA,GAGtCuB,IAAqBvB,EAAuB,sBAAsB,CAAA,GAElEwB,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,OAAOqB,EAAkB,aAAa,GAAG,CAAC;AAAA,UAAA;AAAA,QAChE;AAAA,QAEF,MAAMd;AAAA,QACN,QAAQ,OAAO;AAAA,UACb,YAAY,EAAE,aAAa;AAAA,UAC3B,YAAYP,EAAkBI,GAAQ,cAAc,CAAC;AAAA,UACrD,YAAYJ,EAAkBI,GAAQ,eAAe,CAAC;AAAA,UACtD,YAAYJ,EAAkBI,GAAQ,uBAAuB,CAAC;AAAA,UAC9D,YAAYJ,EAAkBI,GAAQ,eAAe,CAAC;AAAA,QAAA;AAAA,QAExD,OAAO,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,EAChC,GACF;AAEJ;"}
@@ -3,28 +3,26 @@ import { useTranslation as N, Trans as D } from "react-i18next";
3
3
  import { getContractorDisplayName as x } from "../CreatePayment/helpers.js";
4
4
  import u from "./PaymentHistoryPresentation.module.scss.js";
5
5
  import { Flex as l } from "../../../Common/Flex/Flex.js";
6
- import "classnames";
7
- import "../../../../shared/constants.js";
8
6
  import { EmptyData as P } from "../../../Common/EmptyData/EmptyData.js";
9
- import { HamburgerMenu as C } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
10
- import { useComponentContext as F } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { useI18n as v } from "../../../../i18n/I18n.js";
12
- import { formatHoursDisplay as S } from "../../../Payroll/helpers.js";
13
- import w from "../../../../hooks/useNumberFormatter.js";
14
- import { useDateFormatter as L } from "../../../../hooks/useDateFormatter.js";
15
- import M from "../../../../assets/icons/eye.svg.js";
16
- import T from "../../../../assets/icons/slash-circle.svg.js";
7
+ import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ import { useI18n as F } from "../../../../i18n/I18n.js";
9
+ import { formatHoursDisplay as v } from "../../../Payroll/helpers.js";
10
+ import S from "../../../../hooks/useNumberFormatter.js";
11
+ import { useDateFormatter as w } from "../../../../hooks/useDateFormatter.js";
12
+ import L from "../../../../assets/icons/eye.svg.js";
13
+ import M from "../../../../assets/icons/slash-circle.svg.js";
14
+ import { HamburgerMenu as T } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
17
15
  import { DataView as j } from "../../../Common/DataView/DataView.js";
18
- const Z = ({
16
+ const U = ({
19
17
  paymentGroup: s,
20
18
  contractors: h,
21
19
  onViewPayment: b,
22
20
  onCancelPayment: f,
23
21
  isCancelling: y
24
22
  }) => {
25
- const { Text: n, Heading: c } = F();
26
- v("Contractor.Payments.PaymentHistory");
27
- const { t } = N("Contractor.Payments.PaymentHistory"), o = w("currency"), { formatLongWithYear: g } = L(), d = s.contractorPayments || [];
23
+ const { Text: n, Heading: c } = C();
24
+ F("Contractor.Payments.PaymentHistory");
25
+ const { t } = N("Contractor.Payments.PaymentHistory"), o = S("currency"), { formatLongWithYear: g } = w(), d = s.contractorPayments || [];
28
26
  return /* @__PURE__ */ m(l, { flexDirection: "column", gap: 32, children: [
29
27
  /* @__PURE__ */ m(l, { flexDirection: "column", gap: 8, children: [
30
28
  /* @__PURE__ */ r(c, { as: "h2", children: t("title") }),
@@ -62,7 +60,7 @@ const Z = ({
62
60
  },
63
61
  {
64
62
  title: t("tableHeaders.hours"),
65
- render: ({ hours: e }) => /* @__PURE__ */ r(n, { children: e ? S(Number(e)) : "–" })
63
+ render: ({ hours: e }) => /* @__PURE__ */ r(n, { children: e ? v(Number(e)) : "–" })
66
64
  },
67
65
  {
68
66
  title: t("tableHeaders.wage"),
@@ -90,7 +88,7 @@ const Z = ({
90
88
  onClick: () => {
91
89
  b(e);
92
90
  },
93
- icon: /* @__PURE__ */ r("span", { className: u.icon, children: /* @__PURE__ */ r(M, { "aria-hidden": !0 }) })
91
+ icon: /* @__PURE__ */ r("span", { className: u.icon, children: /* @__PURE__ */ r(L, { "aria-hidden": !0 }) })
94
92
  }
95
93
  ];
96
94
  return i && p.push({
@@ -98,9 +96,9 @@ const Z = ({
98
96
  onClick: () => {
99
97
  f(a);
100
98
  },
101
- icon: /* @__PURE__ */ r("span", { className: u.icon, children: /* @__PURE__ */ r(T, { "aria-hidden": !0 }) })
99
+ icon: /* @__PURE__ */ r("span", { className: u.icon, children: /* @__PURE__ */ r(M, { "aria-hidden": !0 }) })
102
100
  }), /* @__PURE__ */ r(
103
- C,
101
+ T,
104
102
  {
105
103
  items: p,
106
104
  triggerLabel: t("tableHeaders.action"),
@@ -116,6 +114,6 @@ const Z = ({
116
114
  ] });
117
115
  };
118
116
  export {
119
- Z as PaymentHistoryPresentation
117
+ U as PaymentHistoryPresentation
120
118
  };
121
119
  //# sourceMappingURL=PaymentHistoryPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentHistoryPresentation.js","sources":["../../../../../src/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { ContractorPaymentGroup } from '@gusto/embedded-api/models/components/contractorpaymentgroup'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport { getContractorDisplayName } from '../CreatePayment/helpers'\nimport styles from './PaymentHistoryPresentation.module.scss'\nimport { DataView, Flex, EmptyData } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport EyeIcon from '@/assets/icons/eye.svg?react'\nimport CancelIcon from '@/assets/icons/slash-circle.svg?react'\n\ninterface PaymentHistoryPresentationProps {\n paymentGroup: ContractorPaymentGroup\n contractors: Contractor[]\n onViewPayment: (paymentId: string) => void\n onCancelPayment: (paymentId: string) => void\n isCancelling: boolean\n}\n\nexport const PaymentHistoryPresentation = ({\n paymentGroup,\n contractors,\n onViewPayment,\n onCancelPayment,\n isCancelling,\n}: PaymentHistoryPresentationProps) => {\n const { Text, Heading } = useComponentContext()\n useI18n('Contractor.Payments.PaymentHistory')\n const { t } = useTranslation('Contractor.Payments.PaymentHistory')\n const currencyFormatter = useNumberFormatter('currency')\n const { formatLongWithYear } = useDateFormatter()\n\n const payments = paymentGroup.contractorPayments || []\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={8}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text>\n <Trans\n i18nKey={'subtitle'}\n t={t}\n values={{ date: formatLongWithYear(paymentGroup.debitDate) }}\n components={{\n strong: <Text weight=\"bold\" as=\"span\" />,\n }}\n />\n </Text>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">{t('paymentsSection')}</Heading>\n\n {payments.length === 0 ? (\n <EmptyData title={t('noPaymentsFound')} description={t('noPaymentsDescription')} />\n ) : (\n <>\n <DataView\n columns={[\n {\n title: t('tableHeaders.contractor'),\n render: ({ contractorUuid }) =>\n getContractorDisplayName(\n contractors.find(contractor => contractor.uuid === contractorUuid),\n ),\n },\n {\n title: t('tableHeaders.wageType'),\n render: ({ wageType }) => <Text>{wageType}</Text>,\n },\n {\n title: t('tableHeaders.paymentMethod'),\n render: ({ paymentMethod }) => <Text>{paymentMethod}</Text>,\n },\n {\n title: t('tableHeaders.hours'),\n render: ({ hours }) => (\n <Text>{hours ? formatHoursDisplay(Number(hours)) : '–'}</Text>\n ),\n },\n {\n title: t('tableHeaders.wage'),\n render: ({ wage }) => <Text>{wage ? currencyFormatter(Number(wage)) : '–'}</Text>,\n },\n {\n title: t('tableHeaders.bonus'),\n render: ({ bonus }) => (\n <Text>{bonus ? currencyFormatter(Number(bonus)) : '–'}</Text>\n ),\n },\n {\n title: t('tableHeaders.reimbursements'),\n render: ({ reimbursement }) => (\n <Text>{reimbursement ? currencyFormatter(Number(reimbursement)) : '–'}</Text>\n ),\n },\n {\n title: t('tableHeaders.total'),\n render: ({ wageTotal, reimbursement, bonus }) => (\n <Text>\n {wageTotal\n ? currencyFormatter(\n Number(wageTotal) + Number(reimbursement) + Number(bonus),\n )\n : '–'}\n </Text>\n ),\n },\n ]}\n itemMenu={({ contractorUuid, mayCancel, uuid }) => {\n const items = [\n {\n label: t('actions.view'),\n onClick: () => {\n onViewPayment(contractorUuid!)\n },\n icon: (\n <span className={styles.icon}>\n <EyeIcon aria-hidden />\n </span>\n ),\n },\n ]\n if (mayCancel) {\n items.push({\n label: t('actions.cancel'),\n onClick: () => {\n onCancelPayment(uuid!)\n },\n icon: (\n <span className={styles.icon}>\n <CancelIcon aria-hidden />\n </span>\n ),\n })\n }\n return (\n <HamburgerMenu\n items={items}\n triggerLabel={t('tableHeaders.action')}\n isLoading={isCancelling}\n />\n )\n }}\n data={payments}\n label={t('title')}\n />\n </>\n )}\n </Flex>\n </Flex>\n )\n}\n"],"names":["PaymentHistoryPresentation","paymentGroup","contractors","onViewPayment","onCancelPayment","isCancelling","Text","Heading","useComponentContext","useI18n","useTranslation","currencyFormatter","useNumberFormatter","formatLongWithYear","useDateFormatter","payments","jsxs","Flex","jsx","Trans","EmptyData","Fragment","DataView","contractorUuid","getContractorDisplayName","contractor","wageType","paymentMethod","hours","formatHoursDisplay","wage","bonus","reimbursement","wageTotal","mayCancel","uuid","items","styles","EyeIcon","CancelIcon","HamburgerMenu"],"mappings":";;;;;;;;;;;;;;;;;AAuBO,MAAMA,IAA6B,CAAC;AAAA,EACzC,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AACF,MAAuC;AACrC,QAAM,EAAE,MAAAC,GAAM,SAAAC,EAAA,IAAYC,EAAA;AAC1B,EAAAC,EAAQ,oCAAoC;AAC5C,QAAM,EAAE,EAAA,IAAMC,EAAe,oCAAoC,GAC3DC,IAAoBC,EAAmB,UAAU,GACjD,EAAE,oBAAAC,EAAA,IAAuBC,EAAA,GAEzBC,IAAWd,EAAa,sBAAsB,CAAA;AAEpD,SACE,gBAAAe,EAACC,GAAA,EA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gBACE,OAAO,EAAE,cAAc;AAAA,gBACvB,SAAS,MAAM;AACb,kBAAAjC,EAAcoB,CAAe;AAAA,gBAC/B;AAAA,gBACA,MACE,gBAAAL,EAAC,QAAA,EAAK,WAAWmB,EAAO,MACtB,UAAA,gBAAAnB,EAACoB,GAAA,EAAQ,eAAW,GAAA,CAAC,EAAA,CACvB;AAAA,cAAA;AAAA,YAEJ;AAEF,mBAAIJ,KACFE,EAAM,KAAK;AAAA,cACT,OAAO,EAAE,gBAAgB;AAAA,cACzB,SAAS,MAAM;AACb,gBAAAhC,EAAgB+B,CAAK;AAAA,cACvB;AAAA,cACA,MACE,gBAAAjB,EAAC,QAAA,EAAK,WAAWmB,EAAO,MACtB,UAAA,gBAAAnB,EAACqB,GAAA,EAAW,eAAW,GAAA,CAAC,EAAA,CAC1B;AAAA,YAAA,CAEH,GAGD,gBAAArB;AAAA,cAACsB;AAAA,cAAA;AAAA,gBACC,OAAAJ;AAAA,gBACA,cAAc,EAAE,qBAAqB;AAAA,gBACrC,WAAW/B;AAAA,cAAA;AAAA,YAAA;AAAA,UAGjB;AAAA,UACA,MAAMU;AAAA,UACN,OAAO,EAAE,OAAO;AAAA,QAAA;AAAA,MAAA,EAClB,CACF;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"PaymentHistoryPresentation.js","sources":["../../../../../src/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { ContractorPaymentGroup } from '@gusto/embedded-api/models/components/contractorpaymentgroup'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport { getContractorDisplayName } from '../CreatePayment/helpers'\nimport styles from './PaymentHistoryPresentation.module.scss'\nimport { DataView, Flex, EmptyData } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport EyeIcon from '@/assets/icons/eye.svg?react'\nimport CancelIcon from '@/assets/icons/slash-circle.svg?react'\n\ninterface PaymentHistoryPresentationProps {\n paymentGroup: ContractorPaymentGroup\n contractors: Contractor[]\n onViewPayment: (paymentId: string) => void\n onCancelPayment: (paymentId: string) => void\n isCancelling: boolean\n}\n\nexport const PaymentHistoryPresentation = ({\n paymentGroup,\n contractors,\n onViewPayment,\n onCancelPayment,\n isCancelling,\n}: PaymentHistoryPresentationProps) => {\n const { Text, Heading } = useComponentContext()\n useI18n('Contractor.Payments.PaymentHistory')\n const { t } = useTranslation('Contractor.Payments.PaymentHistory')\n const currencyFormatter = useNumberFormatter('currency')\n const { formatLongWithYear } = useDateFormatter()\n\n const payments = paymentGroup.contractorPayments || []\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={8}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text>\n <Trans\n i18nKey={'subtitle'}\n t={t}\n values={{ date: formatLongWithYear(paymentGroup.debitDate) }}\n components={{\n strong: <Text weight=\"bold\" as=\"span\" />,\n }}\n />\n </Text>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">{t('paymentsSection')}</Heading>\n\n {payments.length === 0 ? (\n <EmptyData title={t('noPaymentsFound')} description={t('noPaymentsDescription')} />\n ) : (\n <>\n <DataView\n columns={[\n {\n title: t('tableHeaders.contractor'),\n render: ({ contractorUuid }) =>\n getContractorDisplayName(\n contractors.find(contractor => contractor.uuid === contractorUuid),\n ),\n },\n {\n title: t('tableHeaders.wageType'),\n render: ({ wageType }) => <Text>{wageType}</Text>,\n },\n {\n title: t('tableHeaders.paymentMethod'),\n render: ({ paymentMethod }) => <Text>{paymentMethod}</Text>,\n },\n {\n title: t('tableHeaders.hours'),\n render: ({ hours }) => (\n <Text>{hours ? formatHoursDisplay(Number(hours)) : '–'}</Text>\n ),\n },\n {\n title: t('tableHeaders.wage'),\n render: ({ wage }) => <Text>{wage ? currencyFormatter(Number(wage)) : '–'}</Text>,\n },\n {\n title: t('tableHeaders.bonus'),\n render: ({ bonus }) => (\n <Text>{bonus ? currencyFormatter(Number(bonus)) : '–'}</Text>\n ),\n },\n {\n title: t('tableHeaders.reimbursements'),\n render: ({ reimbursement }) => (\n <Text>{reimbursement ? currencyFormatter(Number(reimbursement)) : '–'}</Text>\n ),\n },\n {\n title: t('tableHeaders.total'),\n render: ({ wageTotal, reimbursement, bonus }) => (\n <Text>\n {wageTotal\n ? currencyFormatter(\n Number(wageTotal) + Number(reimbursement) + Number(bonus),\n )\n : '–'}\n </Text>\n ),\n },\n ]}\n itemMenu={({ contractorUuid, mayCancel, uuid }) => {\n const items = [\n {\n label: t('actions.view'),\n onClick: () => {\n onViewPayment(contractorUuid!)\n },\n icon: (\n <span className={styles.icon}>\n <EyeIcon aria-hidden />\n </span>\n ),\n },\n ]\n if (mayCancel) {\n items.push({\n label: t('actions.cancel'),\n onClick: () => {\n onCancelPayment(uuid!)\n },\n icon: (\n <span className={styles.icon}>\n <CancelIcon aria-hidden />\n </span>\n ),\n })\n }\n return (\n <HamburgerMenu\n items={items}\n triggerLabel={t('tableHeaders.action')}\n isLoading={isCancelling}\n />\n )\n }}\n data={payments}\n label={t('title')}\n />\n </>\n )}\n </Flex>\n </Flex>\n )\n}\n"],"names":["PaymentHistoryPresentation","paymentGroup","contractors","onViewPayment","onCancelPayment","isCancelling","Text","Heading","useComponentContext","useI18n","useTranslation","currencyFormatter","useNumberFormatter","formatLongWithYear","useDateFormatter","payments","jsxs","Flex","jsx","Trans","EmptyData","Fragment","DataView","contractorUuid","getContractorDisplayName","contractor","wageType","paymentMethod","hours","formatHoursDisplay","wage","bonus","reimbursement","wageTotal","mayCancel","uuid","items","styles","EyeIcon","CancelIcon","HamburgerMenu"],"mapp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AAEJ;"}
@@ -1,24 +1,24 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { useContractorPaymentGroupsGetSuspense as f } from "@gusto/embedded-api/react-query/contractorPaymentGroupsGet";
3
- import { useContractorsListSuspense as d } from "@gusto/embedded-api/react-query/contractorsList";
2
+ import { useContractorPaymentGroupsGetSuspense as d } from "@gusto/embedded-api/react-query/contractorPaymentGroupsGet";
3
+ import { useContractorsListSuspense as f } from "@gusto/embedded-api/react-query/contractorsList";
4
4
  import { useContractorPaymentsGetReceipt as P } from "@gusto/embedded-api/react-query/contractorPaymentsGetReceipt";
5
- import { APIError as h } from "@gusto/embedded-api/models/errors/apierror";
6
- import { useTranslation as G } from "react-i18next";
5
+ import { GustoEmbeddedError as G } from "@gusto/embedded-api/models/errors/gustoembeddederror";
6
+ import { useTranslation as h } from "react-i18next";
7
7
  import { PaymentStatementPresentation as w } from "./PaymentStatementPresentation.js";
8
8
  import { useComponentDictionary as C } from "../../../../i18n/I18n.js";
9
9
  import { BaseComponent as l } from "../../../Base/Base.js";
10
10
  import "../../../Base/useBase.js";
11
11
  function j(o) {
12
- return /* @__PURE__ */ a(l, { ...o, children: /* @__PURE__ */ a(R, { ...o, children: o.children }) });
12
+ return /* @__PURE__ */ a(l, { ...o, children: /* @__PURE__ */ a(E, { ...o, children: o.children }) });
13
13
  }
14
- const R = ({ paymentGroupId: o, contractorUuid: c, dictionary: s }) => {
14
+ const E = ({ paymentGroupId: o, contractorUuid: c, dictionary: s }) => {
15
15
  C("Contractor.Payments.PaymentStatement", s);
16
- const { t: n } = G("Contractor.Payments.PaymentStatement"), { data: r } = f({
16
+ const { t: n } = h("Contractor.Payments.PaymentStatement"), { data: r } = d({
17
17
  contractorPaymentGroupUuid: o
18
18
  });
19
19
  if (!r.contractorPaymentGroup)
20
20
  throw new Error(n("errors.paymentGroupNotFound"));
21
- const i = r.contractorPaymentGroup.companyUuid, { data: p } = d({ companyUuid: i }), u = p.contractors || [], e = r.contractorPaymentGroup.contractorPayments?.find(
21
+ const i = r.contractorPaymentGroup.companyUuid, { data: p } = f({ companyUuid: i }), u = p.contractors || [], e = r.contractorPaymentGroup.contractorPayments?.find(
22
22
  (t) => t.contractorUuid === c
23
23
  );
24
24
  if (!e)
@@ -29,7 +29,7 @@ const R = ({ paymentGroupId: o, contractorUuid: c, dictionary: s }) => {
29
29
  },
30
30
  {
31
31
  retry: !1,
32
- throwOnError: (t) => !(t instanceof h && t.httpMeta.response.status === 404)
32
+ throwOnError: (t) => !(t instanceof G && t.httpMeta.response.status === 404)
33
33
  }
34
34
  ), m = u.find((t) => t.uuid === c);
35
35
  if (!m)
@@ -46,6 +46,6 @@ const R = ({ paymentGroupId: o, contractorUuid: c, dictionary: s }) => {
46
46
  };
47
47
  export {
48
48
  j as PaymentStatement,
49
- R as Root
49
+ E as Root
50
50
  };
51
51
  //# sourceMappingURL=PaymentStatement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentStatement.js","sources":["../../../../../src/components/Contractor/Payments/PaymentStatement/PaymentStatement.tsx"],"sourcesContent":["import { useContractorPaymentGroupsGetSuspense } from '@gusto/embedded-api/react-query/contractorPaymentGroupsGet'\nimport { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport { useContractorPaymentsGetReceipt } from '@gusto/embedded-api/react-query/contractorPaymentsGetReceipt'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { useTranslation } from 'react-i18next'\nimport { PaymentStatementPresentation } from './PaymentStatementPresentation'\nimport { useComponentDictionary } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\n\ninterface PaymentStatementProps extends BaseComponentInterface<'Contractor.Payments.PaymentStatement'> {\n paymentGroupId: string\n contractorUuid: string\n}\n\nexport function PaymentStatement(props: PaymentStatementProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport const Root = ({ paymentGroupId, contractorUuid, dictionary }: PaymentStatementProps) => {\n useComponentDictionary('Contractor.Payments.PaymentStatement', dictionary)\n const { t } = useTranslation('Contractor.Payments.PaymentStatement')\n // Fetching entire payment\n const { data: paymentGroupResponse } = useContractorPaymentGroupsGetSuspense({\n contractorPaymentGroupUuid: paymentGroupId,\n })\n\n if (!paymentGroupResponse.contractorPaymentGroup) {\n throw new Error(t('errors.paymentGroupNotFound'))\n }\n\n const companyId = paymentGroupResponse.contractorPaymentGroup.companyUuid!\n // Fetching all contractors for the company\n const { data: contractorList } = useContractorsListSuspense({ companyUuid: companyId })\n const contractors = contractorList.contractors || []\n // Locating the payment for the selectedcontractor\n const payment = paymentGroupResponse.contractorPaymentGroup.contractorPayments?.find(\n p => p.contractorUuid === contractorUuid,\n )\n\n if (!payment) {\n throw new Error(t('errors.paymentNotFound'))\n }\n // Attempting to fetch the payment receipt\n // Note: 404 is expected for receipts that aren't available (e.g., non-direct deposit or not yet funded)\n const { data: paymentResponse } = useContractorPaymentsGetReceipt(\n {\n contractorPaymentUuid: payment.uuid!,\n },\n {\n retry: false,\n throwOnError: (error: Error) => {\n // Ignore 404 errors (receipt not available), but throw other errors\n if (error instanceof APIError && error.httpMeta.response.status === 404) {\n return false\n }\n return true\n },\n },\n )\n const contractor = contractors.find(c => c.uuid === contractorUuid)\n if (!contractor) {\n throw new Error(t('errors.contractorNotFound'))\n }\n\n return (\n <PaymentStatementPresentation\n payment={payment}\n contractor={contractor}\n paymentReceipt={paymentResponse?.contractorPaymentReceipt}\n checkDate={paymentGroupResponse.contractorPaymentGroup.checkDate || ''}\n />\n )\n}\n"],"names":["PaymentStatement","props","jsx","BaseComponent","Root","paymentGroupId","contractorUuid","dictionary","useComponentDictionary","t","useTranslation","paymentGroupResponse","useContractorPaymentGroupsGetSuspense","companyId","contractorList","useContractorsListSuspense","contractors","payment","p","paymentResponse","useContractorPaymentsGetReceipt","error","APIError","contractor","c","PaymentStatementPresentation"],"mappings":";;;;;;;;;;AAcO,SAASA,EAAiBC,GAA8B;AAC7D,SACE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a;AAAA,IAAA;AAAA,EAAA;AAG1E;"}
1
+ {"version":3,"file":"PaymentStatement.js","sources":["../../../../../src/components/Contractor/Payments/PaymentStatement/PaymentStatement.tsx"],"sourcesContent":["import { useContractorPaymentGroupsGetSuspense } from '@gusto/embedded-api/react-query/contractorPaymentGroupsGet'\nimport { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport { useContractorPaymentsGetReceipt } from '@gusto/embedded-api/react-query/contractorPaymentsGetReceipt'\nimport { GustoEmbeddedError } from '@gusto/embedded-api/models/errors/gustoembeddederror'\nimport { useTranslation } from 'react-i18next'\nimport { PaymentStatementPresentation } from './PaymentStatementPresentation'\nimport { useComponentDictionary } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\n\ninterface PaymentStatementProps extends BaseComponentInterface<'Contractor.Payments.PaymentStatement'> {\n paymentGroupId: string\n contractorUuid: string\n}\n\nexport function PaymentStatement(props: PaymentStatementProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport const Root = ({ paymentGroupId, contractorUuid, dictionary }: PaymentStatementProps) => {\n useComponentDictionary('Contractor.Payments.PaymentStatement', dictionary)\n const { t } = useTranslation('Contractor.Payments.PaymentStatement')\n // Fetching entire payment\n const { data: paymentGroupResponse } = useContractorPaymentGroupsGetSuspense({\n contractorPaymentGroupUuid: paymentGroupId,\n })\n\n if (!paymentGroupResponse.contractorPaymentGroup) {\n throw new Error(t('errors.paymentGroupNotFound'))\n }\n\n const companyId = paymentGroupResponse.contractorPaymentGroup.companyUuid!\n // Fetching all contractors for the company\n const { data: contractorList } = useContractorsListSuspense({ companyUuid: companyId })\n const contractors = contractorList.contractors || []\n // Locating the payment for the selectedcontractor\n const payment = paymentGroupResponse.contractorPaymentGroup.contractorPayments?.find(\n p => p.contractorUuid === contractorUuid,\n )\n\n if (!payment) {\n throw new Error(t('errors.paymentNotFound'))\n }\n // Attempting to fetch the payment receipt\n // Note: 404 is expected for receipts that aren't available (e.g., non-direct deposit or not yet funded)\n const { data: paymentResponse } = useContractorPaymentsGetReceipt(\n {\n contractorPaymentUuid: payment.uuid!,\n },\n {\n retry: false,\n throwOnError: (error: Error) => {\n // Ignore 404 errors (receipt not available), but throw other errors\n if (error instanceof GustoEmbeddedError && error.httpMeta.response.status === 404) {\n return false\n }\n return true\n },\n },\n )\n const contractor = contractors.find(c => c.uuid === contractorUuid)\n if (!contractor) {\n throw new Error(t('errors.contractorNotFound'))\n }\n\n return (\n <PaymentStatementPresentation\n payment={payment}\n contractor={contractor}\n paymentReceipt={paymentResponse?.contractorPaymentReceipt}\n checkDate={paymentGroupResponse.contractorPaymentGroup.checkDate || ''}\n />\n )\n}\n"],"names":["PaymentStatement","props","jsx","BaseComponent","Root","paymentGroupId","contractorUuid","dictionary","useComponentDictionary","t","useTranslation","paymentGroupResponse","useContractorPaymentGroupsGetSuspense","companyId","contractorList","useContractorsListSuspense","contractors","payment","p","paymentResponse","useContractorPaymentsGetReceipt","error","GustoEmbeddedError","contractor","c","PaymentStatementPresentation"],"mappings":";;;;;;;;;;AAcO,SAASA,EAAiBC,GAA8B;AAC7D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEO,MAAMG,IAAO,CAAC,EAAE,gBAAAC,GAAgB,gBAAAC,GAAgB,YAAAC,QAAwC;AAC7F,EAAAC,EAAuB,wCAAwCD,CAAU;AACzE,QAAM,EAAE,GAAAE,EAAA,IAAMC,EAAe,sCAAsC,GAE7D,EAAE,MAAMC,EAAA,IAAyBC,EAAsC;AAAA,IAC3E,4BAA4BP;AAAA,EAAA,CAC7B;AAED,MAAI,CAACM,EAAqB;AACxB,UAAM,IAAI,MAAMF,EAAE,6BAA6B,CAAC;AAGlD,QAAMI,IAAYF,EAAqB,uBAAuB,aAExD,EAAE,MA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