@gusto/embedded-react-sdk 0.13.0 → 0.13.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 (582) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/_virtual/_commonjsHelpers.js +7 -0
  3. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/dist/_virtual/dynamic-import-helper.js +8 -1
  5. package/dist/_virtual/dynamic-import-helper.js.map +1 -1
  6. package/dist/_virtual/index.js +8 -0
  7. package/dist/_virtual/index.js.map +1 -0
  8. package/dist/assets/icons/close.svg.js +10 -0
  9. package/dist/assets/icons/close.svg.js.map +1 -0
  10. package/dist/components/Base/Base.js +6 -7
  11. package/dist/components/Base/Base.js.map +1 -1
  12. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  13. package/dist/components/Common/DataView/DataCards/DataCards.js +29 -24
  14. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  15. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  16. package/dist/components/Common/DataView/DataTable/DataTable.js +67 -49
  17. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  18. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  19. package/dist/components/Common/DataView/DataView.js +19 -18
  20. package/dist/components/Common/DataView/DataView.js.map +1 -1
  21. package/dist/components/Common/DataView/useDataView.d.ts +4 -1
  22. package/dist/components/Common/DataView/useDataView.js +15 -13
  23. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  24. package/dist/components/Common/FieldDescription/FieldDescription.js +7 -14
  25. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
  26. package/dist/components/Common/Fields/hooks/useField.d.ts +4 -1
  27. package/dist/components/Common/Fields/hooks/useField.js +31 -24
  28. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  29. package/dist/components/Common/ReorderableList/DropZone.js +5 -5
  30. package/dist/components/Common/ReorderableList/ReorderableItem.js +8 -8
  31. package/dist/components/Common/ReorderableList/ReorderableList.js +5 -5
  32. package/dist/components/Common/SignatureForm/SignatureForm.js +5 -8
  33. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  34. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -13
  35. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  36. package/dist/components/Common/SignatureForm/SignatureFormFields.js +10 -13
  37. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  38. package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
  39. package/dist/components/Common/UI/Alert/Alert.js +28 -21
  40. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  41. package/dist/components/Common/UI/Alert/Alert.module.scss.js +7 -3
  42. package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
  43. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +10 -0
  44. package/dist/components/Common/UI/Alert/AlertTypes.js +7 -0
  45. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -0
  46. package/dist/components/Common/UI/Badge/Badge.js +10 -10
  47. package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
  48. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
  49. package/dist/components/Common/UI/Badge/BadgeTypes.js +7 -0
  50. package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -0
  51. package/dist/components/Common/UI/Button/Button.d.ts +1 -1
  52. package/dist/components/Common/UI/Button/Button.js +30 -27
  53. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  54. package/dist/components/Common/UI/Button/ButtonIcon.js +6 -6
  55. package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
  56. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +17 -0
  57. package/dist/components/Common/UI/Button/ButtonTypes.js +14 -0
  58. package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -0
  59. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +1 -1
  60. package/dist/components/Common/UI/Checkbox/Checkbox.d.ts +1 -1
  61. package/dist/components/Common/UI/Checkbox/Checkbox.js +51 -49
  62. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  63. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +7 -0
  64. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js +8 -0
  65. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -0
  66. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  67. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +72 -69
  68. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
  69. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +9 -0
  70. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js +10 -0
  71. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -0
  72. package/dist/components/Common/UI/DatePicker/DatePicker.js +1 -1
  73. package/dist/components/Common/UI/Input/Input.d.ts +1 -1
  74. package/dist/components/Common/UI/Input/Input.js +38 -27
  75. package/dist/components/Common/UI/Input/Input.js.map +1 -1
  76. package/dist/components/Common/UI/Input/InputTypes.d.ts +7 -0
  77. package/dist/components/Common/UI/Input/InputTypes.js +7 -0
  78. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -0
  79. package/dist/components/Common/UI/Menu/Menu.d.ts +1 -1
  80. package/dist/components/Common/UI/Menu/Menu.js +32 -30
  81. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  82. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +6 -0
  83. package/dist/components/Common/UI/Menu/MenuTypes.js +7 -0
  84. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -0
  85. package/dist/components/Common/UI/Radio/Radio.d.ts +1 -1
  86. package/dist/components/Common/UI/Radio/Radio.js +50 -48
  87. package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
  88. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +7 -0
  89. package/dist/components/Common/UI/Radio/RadioTypes.js +8 -0
  90. package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -0
  91. package/dist/components/Common/UI/RadioGroup/RadioGroup.d.ts +1 -1
  92. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +61 -58
  93. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  94. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +9 -0
  95. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js +10 -0
  96. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -0
  97. package/dist/components/Common/UI/Switch/Switch.d.ts +1 -1
  98. package/dist/components/Common/UI/Switch/Switch.js +48 -46
  99. package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
  100. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +7 -0
  101. package/dist/components/Common/UI/Switch/SwitchTypes.js +8 -0
  102. package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -0
  103. package/dist/components/Common/UI/Table/Table.d.ts +1 -1
  104. package/dist/components/Common/UI/Table/Table.js +10 -7
  105. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  106. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  107. package/dist/components/Common/UI/Table/TableTypes.d.ts +4 -0
  108. package/dist/components/Common/UI/Tabs/Tabs.d.ts +7 -0
  109. package/dist/components/Common/UI/Tabs/Tabs.js +25 -0
  110. package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -0
  111. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +8 -0
  112. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js.map +1 -0
  113. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +51 -0
  114. package/dist/components/Common/UI/Tabs/index.d.ts +3 -0
  115. package/dist/components/Common/UI/Text/Text.d.ts +1 -1
  116. package/dist/components/Common/UI/Text/Text.js +22 -25
  117. package/dist/components/Common/UI/Text/Text.js.map +1 -1
  118. package/dist/components/Common/UI/Text/TextTypes.d.ts +7 -0
  119. package/dist/components/Common/UI/Text/TextTypes.js +8 -0
  120. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -0
  121. package/dist/components/Common/UI/TextInput/TextInput.d.ts +1 -1
  122. package/dist/components/Common/UI/TextInput/TextInput.js +53 -51
  123. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  124. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +9 -0
  125. package/dist/components/Common/UI/TextInput/TextInputTypes.js +9 -0
  126. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -0
  127. package/dist/components/Common/hooks/useNumberFormatter.js +1 -1
  128. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
  129. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  130. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  131. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  132. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
  133. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  134. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -8
  135. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  136. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  137. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  138. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +7 -5
  139. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  140. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
  141. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  142. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +9 -10
  143. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  144. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
  145. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  146. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +7 -5
  147. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  148. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  149. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  150. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +9 -7
  151. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  152. package/dist/components/Company/BankAccount/BankAccount.js +1 -1
  153. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  154. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  155. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +2 -2
  156. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  157. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  158. package/dist/components/Company/BankAccount/BankAccountForm/context.js +7 -5
  159. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  160. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
  161. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  162. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
  163. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
  164. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  165. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +2 -2
  166. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  167. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  168. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
  169. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  170. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +12 -14
  171. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  172. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +7 -5
  173. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  174. package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
  175. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -11
  176. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  177. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +7 -5
  178. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  179. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  180. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  181. package/dist/components/Company/FederalTaxes/FederalTaxes.js +18 -20
  182. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  183. package/dist/components/Company/FederalTaxes/Form.js +4 -6
  184. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  185. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -8
  186. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  187. package/dist/components/Company/Industry/Actions.js +5 -7
  188. package/dist/components/Company/Industry/Actions.js.map +1 -1
  189. package/dist/components/Company/Industry/Context.js +10 -8
  190. package/dist/components/Company/Industry/Context.js.map +1 -1
  191. package/dist/components/Company/Industry/Edit.js +10 -12
  192. package/dist/components/Company/Industry/Edit.js.map +1 -1
  193. package/dist/components/Company/Industry/Industry.js +2 -2
  194. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
  195. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  196. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  197. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  198. package/dist/components/Company/Locations/LocationForm/LocationForm.js +14 -16
  199. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  200. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +7 -5
  201. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  202. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  203. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  204. package/dist/components/Company/Locations/LocationsList/List.js +2 -4
  205. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  206. package/dist/components/Company/Locations/LocationsList/LocationsList.js +13 -15
  207. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  208. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +7 -5
  209. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  210. package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
  211. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  212. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
  213. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  214. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -5
  215. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  216. package/dist/components/Company/OnboardingOverview/context.js +7 -5
  217. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  218. package/dist/components/Company/PaySchedule/PaySchedule.js +38 -40
  219. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  220. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -12
  221. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  222. package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
  223. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  224. package/dist/components/Company/PaySchedule/_parts/Head.js +6 -8
  225. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  226. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  227. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  228. package/dist/components/Company/PaySchedule/usePaySchedule.js +10 -8
  229. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  230. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
  231. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  232. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +3 -3
  233. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +7 -5
  234. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  235. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
  236. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  237. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
  238. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  239. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
  240. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +7 -5
  241. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  242. package/dist/components/Contractor/Address/Address.js +8 -10
  243. package/dist/components/Contractor/Address/Address.js.map +1 -1
  244. package/dist/components/Contractor/Address/Form.js +3 -4
  245. package/dist/components/Contractor/Address/Form.js.map +1 -1
  246. package/dist/components/Contractor/Address/useAddress.js +9 -7
  247. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  248. package/dist/components/Contractor/ContractorList/index.js +25 -26
  249. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  250. package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
  251. package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
  252. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  253. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -7
  254. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  255. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +9 -10
  256. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  257. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  258. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  259. package/dist/components/Contractor/Profile/ContractorProfile.js +1 -1
  260. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  261. package/dist/components/Contractor/Profile/useContractorProfile.js +38 -35
  262. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  263. package/dist/components/Contractor/Submit/Submit.js +6 -7
  264. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  265. package/dist/components/Employee/Compensation/Actions.js +5 -6
  266. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  267. package/dist/components/Employee/Compensation/Compensation.js +10 -10
  268. package/dist/components/Employee/Compensation/Edit.js +14 -15
  269. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  270. package/dist/components/Employee/Compensation/List.js +23 -25
  271. package/dist/components/Employee/Compensation/List.js.map +1 -1
  272. package/dist/components/Employee/Deductions/Deductions.js +1 -1
  273. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +14 -15
  274. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  275. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +9 -10
  276. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  277. package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +6 -0
  278. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +11 -12
  279. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  280. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  281. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  282. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -12
  283. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  284. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  285. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  286. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +7 -5
  287. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  288. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +14 -16
  289. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  290. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +7 -5
  291. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  292. package/dist/components/Employee/EmployeeList/Actions.js +4 -6
  293. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  294. package/dist/components/Employee/EmployeeList/EmployeeList.js +7 -8
  295. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  296. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  297. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  298. package/dist/components/Employee/EmployeeList/List.js +14 -15
  299. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  300. package/dist/components/Employee/EmployeeList/useEmployeeList.js +7 -5
  301. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  302. package/dist/components/Employee/FederalTaxes/Actions.js +6 -8
  303. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  304. package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -13
  305. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  306. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +3 -3
  307. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +7 -5
  308. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  309. package/dist/components/Employee/Landing/Landing.js +14 -15
  310. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  311. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +9 -9
  312. package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
  313. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  314. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
  315. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  316. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -10
  317. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  318. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +8 -8
  319. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
  320. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  321. package/dist/components/Employee/PaymentMethod/Split.js +11 -12
  322. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  323. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +13 -11
  324. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  325. package/dist/components/Employee/Profile/Actions.js +7 -9
  326. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  327. package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
  328. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  329. package/dist/components/Employee/Profile/HomeAddress.js +5 -6
  330. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  331. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
  332. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  333. package/dist/components/Employee/Profile/Profile.js +13 -13
  334. package/dist/components/Employee/Profile/useProfile.js +7 -5
  335. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  336. package/dist/components/Employee/StateTaxes/Actions.js +8 -10
  337. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  338. package/dist/components/Employee/StateTaxes/StateTaxes.js +3 -3
  339. package/dist/components/Employee/StateTaxes/useStateTaxes.js +7 -5
  340. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  341. package/dist/components/Employee/Taxes/Actions.js +8 -10
  342. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  343. package/dist/components/Employee/Taxes/FederalForm.js +12 -14
  344. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  345. package/dist/components/Employee/Taxes/Taxes.js +5 -5
  346. package/dist/components/Employee/Taxes/useTaxes.js +7 -5
  347. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  348. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +3 -1
  349. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +57 -67
  350. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  351. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  352. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +85 -88
  353. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  354. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +5 -2
  355. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +67 -13
  356. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  357. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +18 -2
  358. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +117 -19
  359. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  360. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +18 -0
  361. package/dist/components/Payroll/PayrollList/PayrollList.js +25 -19
  362. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  363. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +5 -1
  364. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +67 -33
  365. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  366. package/dist/components/Payroll/PayrollList/types.d.ts +1 -0
  367. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +3 -2
  368. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +50 -26
  369. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  370. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +7 -1
  371. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +269 -49
  372. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  373. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +8 -2
  374. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +78 -22
  375. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
  376. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +11 -9
  377. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -1
  378. package/dist/components/Payroll/helpers.d.ts +7 -6
  379. package/dist/components/Payroll/helpers.js +44 -43
  380. package/dist/components/Payroll/helpers.js.map +1 -1
  381. package/dist/components/Payroll/usePreparedPayrollData.d.ts +14 -0
  382. package/dist/components/Payroll/usePreparedPayrollData.js +39 -0
  383. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -0
  384. package/dist/contexts/ApiProvider/ApiProvider.js +4 -4
  385. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +28 -26
  386. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  387. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +68 -0
  388. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +53 -0
  389. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -0
  390. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  391. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  392. package/dist/contexts/GustoProvider/GustoProvider.js +17 -12
  393. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  394. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -10
  395. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  396. package/dist/helpers/applyMissingDefaults.d.ts +5 -0
  397. package/dist/helpers/applyMissingDefaults.js +10 -0
  398. package/dist/helpers/applyMissingDefaults.js.map +1 -0
  399. package/dist/helpers/formattedStrings.js +11 -12
  400. package/dist/helpers/formattedStrings.js.map +1 -1
  401. package/dist/i18n/I18n.js +5 -5
  402. package/dist/i18n/I18n.js.map +1 -1
  403. package/dist/i18n/en/Employee.Deductions.json.js +68 -60
  404. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  405. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +20 -18
  406. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  407. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -0
  408. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -0
  409. package/dist/i18n/en/Payroll.PayrollList.json.js +12 -10
  410. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  411. package/dist/i18n/en/Payroll.PayrollOverview.json.js +26 -0
  412. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -0
  413. package/dist/i18n/en/Payroll.RunPayroll.json.js +8 -0
  414. package/dist/i18n/en/Payroll.RunPayroll.json.js.map +1 -0
  415. package/dist/i18n/en/payroll.payrollhistory.json.js +20 -0
  416. package/dist/i18n/en/payroll.payrollhistory.json.js.map +1 -0
  417. package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js +40 -0
  418. package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js.map +1 -0
  419. package/dist/node_modules/@react-dnd/asap/dist/RawTask.js +18 -0
  420. package/dist/node_modules/@react-dnd/asap/dist/RawTask.js.map +1 -0
  421. package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js +17 -0
  422. package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js.map +1 -0
  423. package/dist/node_modules/@react-dnd/asap/dist/asap.js +10 -0
  424. package/dist/node_modules/@react-dnd/asap/dist/asap.js.map +1 -0
  425. package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js +63 -0
  426. package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js.map +1 -0
  427. package/dist/node_modules/@react-dnd/invariant/dist/index.js +23 -0
  428. package/dist/node_modules/@react-dnd/invariant/dist/index.js.map +1 -0
  429. package/dist/node_modules/@react-dnd/shallowequal/dist/index.js +26 -0
  430. package/dist/node_modules/@react-dnd/shallowequal/dist/index.js.map +1 -0
  431. package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js +71 -0
  432. package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js.map +1 -0
  433. package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js +55 -0
  434. package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js.map +1 -0
  435. package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js +19 -0
  436. package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js.map +1 -0
  437. package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js +43 -0
  438. package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js.map +1 -0
  439. package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js +18 -0
  440. package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js.map +1 -0
  441. package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js +14 -0
  442. package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js.map +1 -0
  443. package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js +13 -0
  444. package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js.map +1 -0
  445. package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js +10 -0
  446. package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js.map +1 -0
  447. package/dist/node_modules/dnd-core/dist/actions/registry.js +44 -0
  448. package/dist/node_modules/dnd-core/dist/actions/registry.js.map +1 -0
  449. package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js +42 -0
  450. package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js.map +1 -0
  451. package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js +116 -0
  452. package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js.map +1 -0
  453. package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js +97 -0
  454. package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js.map +1 -0
  455. package/dist/node_modules/dnd-core/dist/contracts.js +22 -0
  456. package/dist/node_modules/dnd-core/dist/contracts.js.map +1 -0
  457. package/dist/node_modules/dnd-core/dist/createDragDropManager.js +20 -0
  458. package/dist/node_modules/dnd-core/dist/createDragDropManager.js.map +1 -0
  459. package/dist/node_modules/dnd-core/dist/interfaces.js +8 -0
  460. package/dist/node_modules/dnd-core/dist/interfaces.js.map +1 -0
  461. package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js +31 -0
  462. package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js.map +1 -0
  463. package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js +51 -0
  464. package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js.map +1 -0
  465. package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js +79 -0
  466. package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js.map +1 -0
  467. package/dist/node_modules/dnd-core/dist/reducers/index.js +43 -0
  468. package/dist/node_modules/dnd-core/dist/reducers/index.js.map +1 -0
  469. package/dist/node_modules/dnd-core/dist/reducers/refCount.js +17 -0
  470. package/dist/node_modules/dnd-core/dist/reducers/refCount.js.map +1 -0
  471. package/dist/node_modules/dnd-core/dist/reducers/stateId.js +7 -0
  472. package/dist/node_modules/dnd-core/dist/reducers/stateId.js.map +1 -0
  473. package/dist/node_modules/dnd-core/dist/utils/coords.js +27 -0
  474. package/dist/node_modules/dnd-core/dist/utils/coords.js.map +1 -0
  475. package/dist/node_modules/dnd-core/dist/utils/dirtiness.js +13 -0
  476. package/dist/node_modules/dnd-core/dist/utils/dirtiness.js.map +1 -0
  477. package/dist/node_modules/dnd-core/dist/utils/equality.js +18 -0
  478. package/dist/node_modules/dnd-core/dist/utils/equality.js.map +1 -0
  479. package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js +8 -0
  480. package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js.map +1 -0
  481. package/dist/node_modules/dnd-core/dist/utils/js_utils.js +37 -0
  482. package/dist/node_modules/dnd-core/dist/utils/js_utils.js.map +1 -0
  483. package/dist/node_modules/dnd-core/dist/utils/matchesType.js +9 -0
  484. package/dist/node_modules/dnd-core/dist/utils/matchesType.js.map +1 -0
  485. package/dist/node_modules/fast-deep-equal/index.js +32 -0
  486. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  487. package/dist/node_modules/react-dnd/dist/core/DndContext.js +8 -0
  488. package/dist/node_modules/react-dnd/dist/core/DndContext.js.map +1 -0
  489. package/dist/node_modules/react-dnd/dist/core/DndProvider.js +67 -0
  490. package/dist/node_modules/react-dnd/dist/core/DndProvider.js.map +1 -0
  491. package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js +12 -0
  492. package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js.map +1 -0
  493. package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +23 -0
  494. package/dist/node_modules/react-dnd/dist/hooks/useCollector.js.map +1 -0
  495. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +26 -0
  496. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js.map +1 -0
  497. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +22 -0
  498. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js.map +1 -0
  499. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +21 -0
  500. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js.map +1 -0
  501. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +20 -0
  502. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js.map +1 -0
  503. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +23 -0
  504. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js.map +1 -0
  505. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +16 -0
  506. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js.map +1 -0
  507. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +14 -0
  508. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js.map +1 -0
  509. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +24 -0
  510. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js.map +1 -0
  511. package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js +11 -0
  512. package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js.map +1 -0
  513. package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js +22 -0
  514. package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js.map +1 -0
  515. package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js +13 -0
  516. package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js.map +1 -0
  517. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js +14 -0
  518. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js.map +1 -0
  519. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js +17 -0
  520. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js.map +1 -0
  521. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js +19 -0
  522. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js.map +1 -0
  523. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js +19 -0
  524. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js.map +1 -0
  525. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js +16 -0
  526. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js.map +1 -0
  527. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js +24 -0
  528. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js.map +1 -0
  529. package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js +6 -0
  530. package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  531. package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js +21 -0
  532. package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js.map +1 -0
  533. package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js +11 -0
  534. package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js.map +1 -0
  535. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +89 -0
  536. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js.map +1 -0
  537. package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js +60 -0
  538. package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js.map +1 -0
  539. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +88 -0
  540. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js.map +1 -0
  541. package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js +58 -0
  542. package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js.map +1 -0
  543. package/dist/node_modules/react-dnd/dist/internals/isRef.js +10 -0
  544. package/dist/node_modules/react-dnd/dist/internals/isRef.js.map +1 -0
  545. package/dist/node_modules/react-dnd/dist/internals/registration.js +19 -0
  546. package/dist/node_modules/react-dnd/dist/internals/registration.js.map +1 -0
  547. package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js +47 -0
  548. package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js.map +1 -0
  549. package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js +11 -0
  550. package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js.map +1 -0
  551. package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js +23 -0
  552. package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js.map +1 -0
  553. package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js +275 -0
  554. package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js.map +1 -0
  555. package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js +60 -0
  556. package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js.map +1 -0
  557. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js +44 -0
  558. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js.map +1 -0
  559. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js +11 -0
  560. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js.map +1 -0
  561. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js +25 -0
  562. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js.map +1 -0
  563. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js +49 -0
  564. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js.map +1 -0
  565. package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js +8 -0
  566. package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js.map +1 -0
  567. package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js +71 -0
  568. package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js.map +1 -0
  569. package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js +23 -0
  570. package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js.map +1 -0
  571. package/dist/node_modules/react-dnd-html5-backend/dist/index.js +8 -0
  572. package/dist/node_modules/react-dnd-html5-backend/dist/index.js.map +1 -0
  573. package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js +23 -0
  574. package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js.map +1 -0
  575. package/dist/node_modules/redux/es/redux.js +159 -0
  576. package/dist/node_modules/redux/es/redux.js.map +1 -0
  577. package/dist/shared/constants.d.ts +15 -0
  578. package/dist/shared/constants.js +49 -34
  579. package/dist/shared/constants.js.map +1 -1
  580. package/dist/style.css +1 -1
  581. package/dist/types/i18next.d.ts +129 -1
  582. package/package.json +17 -15
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as p, Fragment as u } from "react/jsx-runtime";
2
- import { useLocationsGetSuspense as L } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/locationsGet.js";
3
- import { useState as c } from "react";
2
+ import { useLocationsGetSuspense as L } from "@gusto/embedded-api/react-query/locationsGet";
3
+ import { useState as m } from "react";
4
4
  import { Head as f } from "./Head.js";
5
5
  import { List as C } from "./List.js";
6
6
  import { Actions as A } from "./Actions.js";
@@ -9,23 +9,21 @@ import { useI18n as O } from "../../../../i18n/I18n.js";
9
9
  import { BaseComponent as x } from "../../../Base/Base.js";
10
10
  import { useBase as E } from "../../../Base/useBase.js";
11
11
  import { Flex as I } from "../../../Common/Flex/Flex.js";
12
- import "classnames";
13
- import { companyEvents as i } from "../../../../shared/constants.js";
14
- import "react-i18next";
15
- function V(o) {
12
+ import { companyEvents as s } from "../../../../shared/constants.js";
13
+ function Q(o) {
16
14
  return /* @__PURE__ */ e(x, { ...o, children: /* @__PURE__ */ e(v, { ...o, children: o.children }) });
17
15
  }
18
- function v({ companyId: o, className: d, children: s }) {
16
+ function v({ companyId: o, className: d, children: i }) {
19
17
  O("Company.Locations");
20
- const { onEvent: a } = E(), [m, n] = c(1), [l, h] = c(5), {
18
+ const { onEvent: a } = E(), [c, n] = m(1), [l, h] = m(5), {
21
19
  data: { locationList: P, httpMeta: g }
22
- } = L({ companyId: o, page: m, per: l }), r = Number(g.response.headers.get("x-total-pages") ?? 1);
20
+ } = L({ companyId: o, page: c, per: l }), r = Number(g.response.headers.get("x-total-pages") ?? 1);
23
21
  return /* @__PURE__ */ e("section", { className: d, children: /* @__PURE__ */ e(
24
22
  N,
25
23
  {
26
24
  value: {
27
25
  locationList: P ?? [],
28
- currentPage: m,
26
+ currentPage: c,
29
27
  totalPages: r,
30
28
  handleFirstPage: () => {
31
29
  n(1);
@@ -43,16 +41,16 @@ function v({ companyId: o, className: d, children: s }) {
43
41
  h(t);
44
42
  },
45
43
  handleAddLocation: () => {
46
- a(i.COMPANY_LOCATION_CREATE);
44
+ a(s.COMPANY_LOCATION_CREATE);
47
45
  },
48
46
  handleEditLocation: (t) => {
49
- a(i.COMPANY_LOCATION_EDIT, { uuid: t });
47
+ a(s.COMPANY_LOCATION_EDIT, { uuid: t });
50
48
  },
51
49
  handleContinue: () => {
52
- a(i.COMPANY_LOCATION_DONE);
50
+ a(s.COMPANY_LOCATION_DONE);
53
51
  }
54
52
  },
55
- children: /* @__PURE__ */ e(I, { flexDirection: "column", gap: 32, children: s || /* @__PURE__ */ p(u, { children: [
53
+ children: /* @__PURE__ */ e(I, { flexDirection: "column", gap: 32, children: i || /* @__PURE__ */ p(u, { children: [
56
54
  /* @__PURE__ */ e(f, {}),
57
55
  /* @__PURE__ */ e(C, {}),
58
56
  /* @__PURE__ */ e(A, {})
@@ -61,6 +59,6 @@ function v({ companyId: o, className: d, children: s }) {
61
59
  ) });
62
60
  }
63
61
  export {
64
- V as LocationsList
62
+ Q as LocationsList
65
63
  };
66
64
  //# sourceMappingURL=LocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/LocationsList.tsx"],"sourcesContent":["import { useLocationsGetSuspense } from '@gusto/embedded-api/react-query/locationsGet'\nimport { useState } from 'react'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { LocationsListProvider } from './useLocationsList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface LocationsListProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport function LocationsList(props: LocationsListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, className, children }: LocationsListProps) {\n useI18n('Company.Locations')\n const { onEvent } = useBase()\n\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const {\n data: { locationList, httpMeta },\n } = useLocationsGetSuspense({ companyId, page: currentPage, per: itemsPerPage })\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_LOCATION_DONE)\n }\n const handleAddLocation = () => {\n onEvent(companyEvents.COMPANY_LOCATION_CREATE)\n }\n const handleEditLocation = (uuid: string) => {\n onEvent(companyEvents.COMPANY_LOCATION_EDIT, { uuid })\n }\n\n return (\n <section className={className}>\n <LocationsListProvider\n value={{\n locationList: locationList ?? [],\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsListProvider>\n </section>\n )\n}\n"],"names":["LocationsList","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","locationList","httpMeta","useLocationsGetSuspense","totalPages","LocationsListProvider","prevPage","newCount","companyEvents","uuid","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;;;AAgBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAgC;AACpE,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C;AAAA,IACJ,MAAM,EAAE,cAAAG,GAAc,UAAAC,EAAA;AAAA,EAAS,IAC7BC,EAAwB,EAAE,W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AEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"LocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/LocationsList.tsx"],"sourcesContent":["import { useLocationsGetSuspense } from '@gusto/embedded-api/react-query/locationsGet'\nimport { useState } from 'react'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { LocationsListProvider } from './useLocationsList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface LocationsListProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport function LocationsList(props: LocationsListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, className, children }: LocationsListProps) {\n useI18n('Company.Locations')\n const { onEvent } = useBase()\n\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const {\n data: { locationList, httpMeta },\n } = useLocationsGetSuspense({ companyId, page: currentPage, per: itemsPerPage })\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_LOCATION_DONE)\n }\n const handleAddLocation = () => {\n onEvent(companyEvents.COMPANY_LOCATION_CREATE)\n }\n const handleEditLocation = (uuid: string) => {\n onEvent(companyEvents.COMPANY_LOCATION_EDIT, { uuid })\n }\n\n return (\n <section className={className}>\n <LocationsListProvider\n value={{\n locationList: locationList ?? [],\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsListProvider>\n </section>\n )\n}\n"],"names":["LocationsList","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","locationList","httpMeta","useLocationsGetSuspense","totalPages","LocationsListProvider","prevPage","newCount","companyEvents","uuid","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAgBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAgC;AACpE,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C;AAAA,IACJ,MAAM,EAAE,cAAAG,GAAc,UAAAC,EAAA;AAAA,EAAS,IAC7BC,EAAwB,EAAE,WAAAb,GAAW,MAAMM,GAAa,KAAKG,GAAc,GAEzEK,IAAa,OAAOF,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC;AA4B7E,SACE,gBAAAf,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAcJ,KAAgB,CAAA;AAAA,QAC9B,aAAAL;AAAA,QACA,YAAAQ;AAAA,QACA,iBA9BgB,MAAM;AAC5B,UAAAP,EAAe,CAAC;AAAA,QAClB;AAAA,QA6BQ,oBA5BmB,MAAM;AAC/B,UAAAA,EAAe,OAAY,KAAK,IAAIS,IAAW,GAAG,CAAC,CAAC;AAAA,QACtD;AAAA,QA2BQ,gBA1Be,MAAM;AAC3B,UAAAT,EAAe,OAAY,KAAK,IAAIS,IAAW,GAAGF,CAAU,CAAC;AAAA,QAC/D;AAAA,QAyBQ,gBAxBe,MAAM;AAC3B,UAAAP,EAAeO,CAAU;AAAA,QAC3B;AAAA,QAuBQ,0BArCyB,CAACG,MAAqB;AACrD,UAAAP,EAAgBO,CAAQ;AAAA,QAC1B;AAAA,QAoCQ,mBAnBkB,MAAM;AAC9B,UAAAb,EAAQc,EAAc,uBAAuB;AAAA,QAC/C;AAAA,QAkBQ,oBAjBmB,CAACC,MAAiB;AAC3C,UAAAf,EAAQc,EAAc,uBAAuB,EAAE,MAAAC,EAAA,CAAM;AAAA,QACvD;AAAA,QAgBQ,gBAxBe,MAAM;AAC3B,UAAAf,EAAQc,EAAc,qBAAqB;AAAA,QAC7C;AAAA,MAsBQ;AAAA,MAGF,UAAA,gBAAArB,EAACuB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAlB,KAGC,gBAAAmB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAzB,EAAC0B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -2,18 +2,20 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
+ import "@gusto/embedded-api/models/errors/apierror";
6
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
+ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
5
9
  import "../../../Base/useBase.js";
6
10
  import "../../../../shared/constants.js";
7
- import "classnames";
8
11
  import "dompurify";
9
- import "../../../../contexts/LocaleProvider/useLocale.js";
10
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
12
- const [C, u] = o(
14
+ const [x, d] = o(
13
15
  "CompanyDocumentListContext"
14
16
  );
15
17
  export {
16
- u as LocationsListProvider,
17
- C as useLocationsList
18
+ d as LocationsListProvider,
19
+ x as useLocationsList
18
20
  };
19
21
  //# sourceMappingURL=useLocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n currentPage: number\n handleItemsPerPageChange: (n: number) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;AAiBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n currentPage: number\n handleItemsPerPageChange: (n: number) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAiBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -1,19 +1,17 @@
1
- import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
- import { useTranslation as m } from "react-i18next";
3
- import { useOnboardingOverview as l } from "./context.js";
4
- import { Flex as p } from "../../Common/Flex/Flex.js";
5
- import "classnames";
6
- import "../../../shared/constants.js";
7
- import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- const x = () => {
9
- const e = a(), { onboardingCompleted: t, handleDone: r } = l(), { t: o } = m("Company.OnboardingOverview");
10
- return t ? /* @__PURE__ */ i(p, { alignItems: "center", flexDirection: "column", gap: 8, children: [
11
- /* @__PURE__ */ n(e.Heading, { as: "h2", textAlign: "center", children: o("onboardingCompletedTitle") }),
12
- /* @__PURE__ */ n("p", { children: o("onboardingCompletedDescription") }),
13
- /* @__PURE__ */ n(e.Button, { variant: "secondary", onClick: r, children: o("onboardingCompletedCta") })
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import { useTranslation as l } from "react-i18next";
3
+ import { useOnboardingOverview as m } from "./context.js";
4
+ import { Flex as a } from "../../Common/Flex/Flex.js";
5
+ import { useComponentContext as d } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ const u = () => {
7
+ const e = d(), { onboardingCompleted: t, handleDone: r } = m(), { t: n } = l("Company.OnboardingOverview");
8
+ return t ? /* @__PURE__ */ i(a, { alignItems: "center", flexDirection: "column", gap: 8, children: [
9
+ /* @__PURE__ */ o(e.Heading, { as: "h2", textAlign: "center", children: n("onboardingCompletedTitle") }),
10
+ /* @__PURE__ */ o("p", { children: n("onboardingCompletedDescription") }),
11
+ /* @__PURE__ */ o(e.Button, { variant: "secondary", onClick: r, children: n("onboardingCompletedCta") })
14
12
  ] }) : null;
15
13
  };
16
14
  export {
17
- x as Completed
15
+ u as Completed
18
16
  };
19
17
  //# sourceMappingURL=Completed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Completed.js","sources":["../../../../src/components/Company/OnboardingOverview/Completed.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Completed = () => {\n const Components = useComponentContext()\n const { onboardingCompleted, handleDone } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n if (!onboardingCompleted) {\n return null\n }\n return (\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('onboardingCompletedTitle')}\n </Components.Heading>\n <p>{t('onboardingCompletedDescription')}</p>\n <Components.Button variant=\"secondary\" onClick={handleDone}>\n {t('onboardingCompletedCta')}\n </Components.Button>\n </Flex>\n )\n}\n"],"names":["Completed","Components","useComponentContext","onboardingCompleted","handleDone","useOnboardingOverview","t","useTranslation","Flex","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAY,MAAM;AAC7B,QAAMC,IAAaC,EAAA,GACb,EAAE,qBAAAC,GAAqB,YAAAC,EAAA,IAAeC,EAAA,GACtC,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AACzD,SAAKJ,sBAIFK,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAAK,EAAE,0BAA0B,EAAA,CAC/B;AAAA,IACA,gBAAAG,EAAC,KAAA,EAAG,UAAAH,EAAE,gCAAgC,EAAA,CAAE;AAAA,IACxC,gBAAAG,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASG,GAC7C,UAAAE,EAAE,wBAAwB,EAAA,CAC7B;AAAA,EAAA,GACF,IAXO;AAaX;"}
1
+ {"version":3,"file":"Completed.js","sources":["../../../../src/components/Company/OnboardingOverview/Completed.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Completed = () => {\n const Components = useComponentContext()\n const { onboardingCompleted, handleDone } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n if (!onboardingCompleted) {\n return null\n }\n return (\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('onboardingCompletedTitle')}\n </Components.Heading>\n <p>{t('onboardingCompletedDescription')}</p>\n <Components.Button variant=\"secondary\" onClick={handleDone}>\n {t('onboardingCompletedCta')}\n </Components.Button>\n </Flex>\n )\n}\n"],"names":["Completed","Components","useComponentContext","onboardingCompleted","handleDone","useOnboardingOverview","t","useTranslation","Flex","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAY,MAAM;AAC7B,QAAMC,IAAaC,EAAA,GACb,EAAE,qBAAAC,GAAqB,YAAAC,EAAA,IAAeC,EAAA,GACtC,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AACzD,SAAKJ,sBAIFK,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAAK,EAAE,0BAA0B,EAAA,CAC/B;AAAA,IACA,gBAAAG,EAAC,KAAA,EAAG,UAAAH,EAAE,gCAAgC,EAAA,CAAE;AAAA,IACxC,gBAAAG,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASG,GAC7C,UAAAE,EAAE,wBAAwB,EAAA,CAC7B;AAAA,EAAA,GACF,IAXO;AAaX;"}
@@ -1,18 +1,16 @@
1
- import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as l } from "react-i18next";
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import { useTranslation as p } from "react-i18next";
3
3
  import { useOnboardingOverview as a } from "./context.js";
4
4
  import { Flex as c } from "../../Common/Flex/Flex.js";
5
- import "classnames";
6
- import "../../../shared/constants.js";
7
5
  import { ActionsLayout as u } from "../../Common/ActionsLayout/ActionsLayout.js";
8
6
  import { RequirementsList as d } from "../../Common/RequirementsList/RequirementsList.js";
9
7
  import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
10
- const D = () => {
11
- const r = g(), { onboardingSteps: n, onboardingCompleted: s, handleContinue: m } = a(), { t: e } = l("Company.OnboardingOverview");
8
+ const S = () => {
9
+ const r = g(), { onboardingSteps: n, onboardingCompleted: s, handleContinue: m } = a(), { t: e } = p("Company.OnboardingOverview");
12
10
  if (s)
13
11
  return null;
14
12
  const o = !n?.some((i) => i.required && i.completed);
15
- return /* @__PURE__ */ p(c, { flexDirection: "column", alignItems: "flex-start", gap: 8, children: [
13
+ return /* @__PURE__ */ l(c, { flexDirection: "column", alignItems: "flex-start", gap: 8, children: [
16
14
  /* @__PURE__ */ t(r.Heading, { as: "h2", children: e(o ? "initialSetupTitle" : "missingRequirementsTitle") }),
17
15
  /* @__PURE__ */ t("p", { children: e(o ? "initialSetupDescription" : "missingRequirementsDescription") }),
18
16
  n && /* @__PURE__ */ t(
@@ -29,6 +27,6 @@ const D = () => {
29
27
  ] });
30
28
  };
31
29
  export {
32
- D as MissingRequirements
30
+ S as MissingRequirements
33
31
  };
34
32
  //# sourceMappingURL=MissingRequirements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MissingRequirements.js","sources":["../../../../src/components/Company/OnboardingOverview/MissingRequirements.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { RequirementsList } from '@/components/Common/RequirementsList/RequirementsList'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const MissingRequirements = () => {\n const Components = useComponentContext()\n const { onboardingSteps, onboardingCompleted, handleContinue } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n\n if (onboardingCompleted) {\n return null\n }\n\n const isInitialSetup = !onboardingSteps?.some(step => step.required && step.completed)\n\n return (\n <Flex flexDirection=\"column\" alignItems=\"flex-start\" gap={8}>\n <Components.Heading as=\"h2\">\n {t(isInitialSetup ? 'initialSetupTitle' : 'missingRequirementsTitle')}\n </Components.Heading>\n <p>{t(isInitialSetup ? 'initialSetupDescription' : 'missingRequirementsDescription')}</p>\n {onboardingSteps && (\n <RequirementsList\n requirements={onboardingSteps.map(step => ({\n completed: step.completed!,\n title: t(`stepTitles.${step.id!}`),\n description: t(`stepDescriptions.${step.id!}`),\n }))}\n />\n )}\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleContinue}>\n {t(isInitialSetup ? 'initialSetupCta' : 'missingRequirementsCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["MissingRequirements","Components","useComponentContext","onboardingSteps","onboardingCompleted","handleContinue","useOnboardingOverview","t","useTranslation","isInitialSetup","step","Flex","jsx","RequirementsList","ActionsLayout"],"mappings":";;;;;;;;;AAMO,MAAMA,IAAsB,MAAM;AACvC,QAAMC,IAAaC,EAAA,GACb,EAAE,iBAAAC,GAAiB,qBAAAC,GAAqB,gBAAAC,EAAA,IAAmBC,EAAA,GAC3D,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AAEzD,MAAIJ;AACF,WAAO;AAGT,QAAMK,IAAiB,CAACN,GAAiB,KAAK,OAAQO,EAAK,YAAYA,EAAK,SAAS;AAErF,2BACGC,GAAA,EAAK,eAAc,UAAS,YAAW,cAAa,KAAK,GACxD,UAAA;AAAA,IAAA,gBAAAC,EAACX,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAAM,EAAEE,IAAiB,sBAAsB,0BAA0B,EAAA,CACtE;AAAA,sBACC,KAAA,EAAG,UAAAF,EAAEE,IAAiB,4BAA4B,gCAAgC,GAAE;AAAA,IACpFN,KACC,gBAAAS;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAcV,EAAgB,IAAI,CAAAO,OAAS;AAAA,UACzC,WAAWA,EAAK;AAAA,UAChB,OAAOH,EAAE,cAAcG,EAAK,EAAG,EAAE;AAAA,UACjC,aAAaH,EAAE,oBAAoBG,EAAK,EAAG,EAAE;AAAA,QAAA,EAC7C;AAAA,MAAA;AAAA,IAAA;AAAA,IAGN,gBAAAE,EAACE,GAAA,EACC,UAAA,gBAAAF,EAACX,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASI,GAC7C,UAAAE,EAAEE,IAAiB,oBAAoB,wBAAwB,GAClE,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"MissingRequirements.js","sources":["../../../../src/components/Company/OnboardingOverview/MissingRequirements.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { RequirementsList } from '@/components/Common/RequirementsList/RequirementsList'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const MissingRequirements = () => {\n const Components = useComponentContext()\n const { onboardingSteps, onboardingCompleted, handleContinue } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n\n if (onboardingCompleted) {\n return null\n }\n\n const isInitialSetup = !onboardingSteps?.some(step => step.required && step.completed)\n\n return (\n <Flex flexDirection=\"column\" alignItems=\"flex-start\" gap={8}>\n <Components.Heading as=\"h2\">\n {t(isInitialSetup ? 'initialSetupTitle' : 'missingRequirementsTitle')}\n </Components.Heading>\n <p>{t(isInitialSetup ? 'initialSetupDescription' : 'missingRequirementsDescription')}</p>\n {onboardingSteps && (\n <RequirementsList\n requirements={onboardingSteps.map(step => ({\n completed: step.completed!,\n title: t(`stepTitles.${step.id!}`),\n description: t(`stepDescriptions.${step.id!}`),\n }))}\n />\n )}\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleContinue}>\n {t(isInitialSetup ? 'initialSetupCta' : 'missingRequirementsCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["MissingRequirements","Components","useComponentContext","onboardingSteps","onboardingCompleted","handleContinue","useOnboardingOverview","t","useTranslation","isInitialSetup","step","Flex","jsx","RequirementsList","ActionsLayout"],"mappings":";;;;;;;AAMO,MAAMA,IAAsB,MAAM;AACvC,QAAMC,IAAaC,EAAA,GACb,EAAE,iBAAAC,GAAiB,qBAAAC,GAAqB,gBAAAC,EAAA,IAAmBC,EAAA,GAC3D,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AAEzD,MAAIJ;AACF,WAAO;AAGT,QAAMK,IAAiB,CAACN,GAAiB,KAAK,OAAQO,EAAK,YAAYA,EAAK,SAAS;AAErF,2BACGC,GAAA,EAAK,eAAc,UAAS,YAAW,cAAa,KAAK,GACxD,UAAA;AAAA,IAAA,gBAAAC,EAACX,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAAM,EAAEE,IAAiB,sBAAsB,0BAA0B,EAAA,CACtE;AAAA,sBACC,KAAA,EAAG,UAAAF,EAAEE,IAAiB,4BAA4B,gCAAgC,GAAE;AAAA,IACpFN,KACC,gBAAAS;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAcV,EAAgB,IAAI,CAAAO,OAAS;AAAA,UACzC,WAAWA,EAAK;AAAA,UAChB,OAAOH,EAAE,cAAcG,EAAK,EAAG,EAAE;AAAA,UACjC,aAAaH,EAAE,oBAAoBG,EAAK,EAAG,EAAE;AAAA,QAAA,EAC7C;AAAA,MAAA;AAAA,IAAA;AAAA,IAGN,gBAAAE,EAACE,GAAA,EACC,UAAA,gBAAAF,EAACX,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASI,GAC7C,UAAAE,EAAEE,IAAiB,oBAAoB,wBAAwB,GAClE,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, jsxs as s, Fragment as c } from "react/jsx-runtime";
2
- import { useCompaniesGetOnboardingStatusSuspense as p } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/companiesGetOnboardingStatus.js";
2
+ import { useCompaniesGetOnboardingStatusSuspense as p } from "@gusto/embedded-api/react-query/companiesGetOnboardingStatus";
3
3
  import { OnboardingOverviewProvider as l } from "./context.js";
4
4
  import { MissingRequirements as u } from "./MissingRequirements.js";
5
5
  import { Completed as O } from "./Completed.js";
@@ -7,10 +7,8 @@ import { BaseComponent as f } from "../../Base/Base.js";
7
7
  import { useBase as v } from "../../Base/useBase.js";
8
8
  import { useI18n as C, useComponentDictionary as g } from "../../../i18n/I18n.js";
9
9
  import { Flex as h } from "../../Common/Flex/Flex.js";
10
- import "classnames";
11
10
  import { componentEvents as i } from "../../../shared/constants.js";
12
- import "react-i18next";
13
- function A(o) {
11
+ function P(o) {
14
12
  return C("Company.OnboardingOverview"), g("Company.OnboardingOverview", o.dictionary), /* @__PURE__ */ n(f, { ...o, children: /* @__PURE__ */ n(b, { ...o, children: o.children }) });
15
13
  }
16
14
  const b = ({ companyId: o, className: t, children: e }) => {
@@ -36,6 +34,6 @@ const b = ({ companyId: o, className: t, children: e }) => {
36
34
  ) });
37
35
  };
38
36
  export {
39
- A as OnboardingOverview
37
+ P as OnboardingOverview
40
38
  };
41
39
  //# sourceMappingURL=OnboardingOverview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingOverview.js","sources":["../../../../src/components/Company/OnboardingOverview/OnboardingOverview.tsx"],"sourcesContent":["import { useCompaniesGetOnboardingStatusSuspense } from '@gusto/embedded-api/react-query/companiesGetOnboardingStatus'\nimport { OnboardingOverviewProvider } from './context'\nimport { MissingRequirements } from './MissingRequirements'\nimport { Completed } from './Completed'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface OnboardingOverviewProps extends CommonComponentInterface<'Company.OnboardingOverview'> {\n companyId: string\n}\n\nexport function OnboardingOverview(props: OnboardingOverviewProps & BaseComponentInterface) {\n useI18n('Company.OnboardingOverview')\n useComponentDictionary('Company.OnboardingOverview', props.dictionary)\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, className, children }: OnboardingOverviewProps) => {\n const { onEvent } = useBase()\n\n const { data } = useCompaniesGetOnboardingStatusSuspense({ companyUuid: companyId })\n const { onboardingCompleted, onboardingSteps } = data.companyOnboardingStatus!\n\n const handleDone = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_DONE)\n }\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_CONTINUE)\n }\n\n return (\n <section className={className}>\n <OnboardingOverviewProvider\n value={{\n onboardingCompleted,\n onboardingSteps,\n handleDone,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Completed />\n <MissingRequirements />\n </>\n )}\n </Flex>\n </OnboardingOverviewProvider>\n </section>\n )\n}\n"],"names":["OnboardingOverview","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","companyId","className","children","onEvent","useBase","data","useCompaniesGetOnboardingStatusSuspense","onboardingCompleted","onboardingSteps","OnboardingOverviewProvider","componentEvents","Flex","jsxs","Fragment","Completed","MissingRequirements"],"mappings":";;;;;;;;;;;;AAmBO,SAASA,EAAmBC,GAAyD;AAC1F,SAAAC,EAAQ,4BAA4B,GACpCC,EAAuB,8BAA8BF,EAAM,UAAU,GAEnE,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,QAAwC;AAC5E,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,EAAA,IAASC,EAAwC,EAAE,aAAaN,GAAW,GAC7E,EAAE,qBAAAO,GAAqB,iBAAAC,EAAA,IAAoBH,EAAK;AAStD,SACE,gBAAAR,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,qBAAAF;AAAA,QACA,iBAAAC;AAAA,QACA,YAbW,MAAM;AACvB,UAAAL,EAAQO,EAAgB,qBAAqB;AAAA,QAC/C;AAAA,QAYQ,gBAXe,MAAM;AAC3B,UAAAP,EAAQO,EAAgB,yBAAyB;AAAA,QACnD;AAAA,MASQ;AAAA,MAGF,UAAA,gBAAAb,EAACc,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,KAGC,gBAAAU,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhB,EAACiB,GAAA,EAAU;AAAA,0BACVC,GAAA,CAAA,CAAoB;AAAA,MAAA,EAAA,CACvB,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"OnboardingOverview.js","sources":["../../../../src/components/Company/OnboardingOverview/OnboardingOverview.tsx"],"sourcesContent":["import { useCompaniesGetOnboardingStatusSuspense } from '@gusto/embedded-api/react-query/companiesGetOnboardingStatus'\nimport { OnboardingOverviewProvider } from './context'\nimport { MissingRequirements } from './MissingRequirements'\nimport { Completed } from './Completed'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface OnboardingOverviewProps extends CommonComponentInterface<'Company.OnboardingOverview'> {\n companyId: string\n}\n\nexport function OnboardingOverview(props: OnboardingOverviewProps & BaseComponentInterface) {\n useI18n('Company.OnboardingOverview')\n useComponentDictionary('Company.OnboardingOverview', props.dictionary)\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, className, children }: OnboardingOverviewProps) => {\n const { onEvent } = useBase()\n\n const { data } = useCompaniesGetOnboardingStatusSuspense({ companyUuid: companyId })\n const { onboardingCompleted, onboardingSteps } = data.companyOnboardingStatus!\n\n const handleDone = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_DONE)\n }\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_CONTINUE)\n }\n\n return (\n <section className={className}>\n <OnboardingOverviewProvider\n value={{\n onboardingCompleted,\n onboardingSteps,\n handleDone,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Completed />\n <MissingRequirements />\n </>\n )}\n </Flex>\n </OnboardingOverviewProvider>\n </section>\n )\n}\n"],"names":["OnboardingOverview","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","companyId","className","children","onEvent","useBase","data","useCompaniesGetOnboardingStatusSuspense","onboardingCompleted","onboardingSteps","OnboardingOverviewProvider","componentEvents","Flex","jsxs","Fragment","Completed","MissingRequirements"],"mappings":";;;;;;;;;;AAmBO,SAASA,EAAmBC,GAAyD;AAC1F,SAAAC,EAAQ,4BAA4B,GACpCC,EAAuB,8BAA8BF,EAAM,UAAU,GAEnE,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,QAAwC;AAC5E,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,EAAA,IAASC,EAAwC,EAAE,aAAaN,GAAW,GAC7E,EAAE,qBAAAO,GAAqB,iBAAAC,EAAA,IAAoBH,EAAK;AAStD,SACE,gBAAAR,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,qBAAAF;AAAA,QACA,iBAAAC;AAAA,QACA,YAbW,MAAM;AACvB,UAAAL,EAAQO,EAAgB,qBAAqB;AAAA,QAC/C;AAAA,QAYQ,gBAXe,MAAM;AAC3B,UAAAP,EAAQO,EAAgB,yBAAyB;AAAA,QACnD;AAAA,MASQ;AAAA,MAGF,UAAA,gBAAAb,EAACc,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,KAGC,gBAAAU,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhB,EAACiB,GAAA,EAAU;AAAA,0BACVC,GAAA,CAAA,CAAoB;AAAA,MAAA,EAAA,CACvB,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -2,16 +2,18 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
+ import "@gusto/embedded-api/models/errors/apierror";
6
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
+ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
5
9
  import "../../Base/useBase.js";
6
10
  import "../../../shared/constants.js";
7
- import "classnames";
8
11
  import "dompurify";
9
- import "../../../contexts/LocaleProvider/useLocale.js";
10
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
13
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
12
- const [b, g] = o("OnboardingOverviewContext");
14
+ const [w, x] = o("OnboardingOverviewContext");
13
15
  export {
14
- g as OnboardingOverviewProvider,
15
- b as useOnboardingOverview
16
+ x as OnboardingOverviewProvider,
17
+ w as useOnboardingOverview
16
18
  };
17
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
@@ -1,42 +1,40 @@
1
- import { jsx as a, jsxs as I } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as I } from "react/jsx-runtime";
2
2
  import { useForm as j, FormProvider as k } from "react-hook-form";
3
- import { zodResolver as G } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@hookform/resolvers/zod/dist/zod.mjs";
3
+ import { zodResolver as G } from "@hookform/resolvers/zod";
4
4
  import { useState as A, useEffect as _ } from "react";
5
- import { usePaySchedulesGetPreview as z } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/paySchedulesGetPreview.js";
6
- import { usePaySchedulesUpdateMutation as J } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/paySchedulesUpdate.js";
7
- import { usePaySchedulesGetAllSuspense as K } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/paySchedulesGetAll.js";
8
- import { usePaySchedulesCreateMutation as Q } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/paySchedulesCreate.js";
5
+ import { usePaySchedulesGetPreview as z } from "@gusto/embedded-api/react-query/paySchedulesGetPreview";
6
+ import { usePaySchedulesUpdateMutation as J } from "@gusto/embedded-api/react-query/paySchedulesUpdate";
7
+ import { usePaySchedulesGetAllSuspense as K } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
8
+ import { usePaySchedulesCreateMutation as Q } from "@gusto/embedded-api/react-query/paySchedulesCreate";
9
9
  import { PayScheduleSchema as W, PayScheduleProvider as X } from "./usePaySchedule.js";
10
10
  import { Form as Z } from "../../Common/Form/Form.js";
11
11
  import { BaseComponent as $ } from "../../Base/Base.js";
12
12
  import { useBase as V } from "../../Base/useBase.js";
13
13
  import { Flex as ee } from "../../Common/Flex/Flex.js";
14
- import "classnames";
15
- import { componentEvents as S } from "../../../shared/constants.js";
16
- import "react-i18next";
17
14
  import { useI18n as oe, useComponentDictionary as re } from "../../../i18n/I18n.js";
15
+ import { componentEvents as S } from "../../../shared/constants.js";
18
16
  import { formatDateToStringDate as l } from "../../../helpers/dateFormatting.js";
19
- import { Head as te } from "./_parts/Head.js";
20
- import { List as ae } from "./_parts/List.js";
17
+ import { Head as ae } from "./_parts/Head.js";
18
+ import { List as te } from "./_parts/List.js";
21
19
  import { Edit as ne } from "./_parts/Edit.js";
22
20
  import { Actions as ce } from "./_parts/Actions.js";
23
- const He = ({
21
+ const Te = ({
24
22
  companyId: n,
25
23
  defaultValues: s,
26
- dictionary: t,
27
- ...m
28
- }) => (oe("Company.PaySchedule"), re("Company.PaySchedule", t), /* @__PURE__ */ a($, { ...m, children: /* @__PURE__ */ a(ie, { companyId: n, defaultValues: s, children: m.children }) })), ie = ({ companyId: n, children: s, defaultValues: t }) => {
29
- const { baseSubmitHandler: m, onEvent: u, fieldErrors: h, setError: C } = V(), { data: p } = K({
24
+ dictionary: a,
25
+ ...y
26
+ }) => (oe("Company.PaySchedule"), re("Company.PaySchedule", a), /* @__PURE__ */ t($, { ...y, children: /* @__PURE__ */ t(ie, { companyId: n, defaultValues: s, children: y.children }) })), ie = ({ companyId: n, children: s, defaultValues: a }) => {
27
+ const { baseSubmitHandler: y, onEvent: u, fieldErrors: h, setError: C } = V(), { data: p } = K({
30
28
  companyId: n
31
- }), [i, y] = A(
29
+ }), [i, P] = A(
32
30
  p.payScheduleList?.length === 0 ? "ADD_PAY_SCHEDULE" : "LIST_PAY_SCHEDULES"
33
31
  ), [f, w] = A(null), L = {
34
- frequency: t?.frequency ?? "Every week",
35
- anchorPayDate: t?.anchorPayDate ? new Date(t.anchorPayDate) : void 0,
36
- anchorEndOfPayPeriod: t?.anchorEndOfPayPeriod ? new Date(t.anchorEndOfPayPeriod) : void 0,
37
- day1: t?.day1 ?? void 0,
38
- day2: t?.day2 ?? void 0,
39
- customName: t?.customName ?? "",
32
+ frequency: a?.frequency ?? "Every week",
33
+ anchorPayDate: a?.anchorPayDate ? new Date(a.anchorPayDate) : void 0,
34
+ anchorEndOfPayPeriod: a?.anchorEndOfPayPeriod ? new Date(a.anchorEndOfPayPeriod) : void 0,
35
+ day1: a?.day1 ?? void 0,
36
+ day2: a?.day2 ?? void 0,
37
+ customName: a?.customName ?? "",
40
38
  customTwicePerMonth: "false"
41
39
  }, q = Q(), T = J(), E = j({
42
40
  resolver: G(W),
@@ -64,9 +62,9 @@ const He = ({
64
62
  e.frequency === "Twice per month" && e.day1 === 15 && e.day2 === 31 && e.customTwicePerMonth === void 0 ? D("customTwicePerMonth", "1st15th") : e.frequency === "Twice per month" && e.customTwicePerMonth === void 0 && D("customTwicePerMonth", "custom");
65
63
  }, [e.frequency, e.day1, e.day2, D, e.customTwicePerMonth]);
66
64
  const b = () => {
67
- y("ADD_PAY_SCHEDULE"), d({});
65
+ P("ADD_PAY_SCHEDULE"), d({});
68
66
  }, g = () => {
69
- y("LIST_PAY_SCHEDULES"), d({}), H(), C(null);
67
+ P("LIST_PAY_SCHEDULES"), d({}), H(), C(null);
70
68
  }, B = (o) => {
71
69
  d({
72
70
  frequency: o.frequency,
@@ -75,20 +73,20 @@ const He = ({
75
73
  day1: o.day1 ?? void 0,
76
74
  day2: o.day2 ?? void 0,
77
75
  customName: o.customName ?? ""
78
- }), w(o), y("EDIT_PAY_SCHEDULE");
76
+ }), w(o), P("EDIT_PAY_SCHEDULE");
79
77
  }, x = () => {
80
78
  u(S.PAY_SCHEDULE_DONE);
81
79
  }, R = async (o) => {
82
- await m(o, async (r) => {
83
- const P = (c) => c && l(c) || "";
80
+ await y(o, async (r) => {
81
+ const m = (c) => c && l(c) || "";
84
82
  if (i === "ADD_PAY_SCHEDULE") {
85
83
  const c = await q.mutateAsync({
86
84
  request: {
87
85
  companyId: n,
88
86
  requestBody: {
89
87
  frequency: r.frequency,
90
- anchorPayDate: P(r.anchorPayDate),
91
- anchorEndOfPayPeriod: P(r.anchorEndOfPayPeriod),
88
+ anchorPayDate: m(r.anchorPayDate),
89
+ anchorEndOfPayPeriod: m(r.anchorEndOfPayPeriod),
92
90
  customName: r.customName,
93
91
  day1: r.day1,
94
92
  day2: r.day2
@@ -103,8 +101,8 @@ const He = ({
103
101
  companyId: n,
104
102
  requestBody: {
105
103
  frequency: r.frequency,
106
- anchorPayDate: P(r.anchorPayDate),
107
- anchorEndOfPayPeriod: P(r.anchorEndOfPayPeriod),
104
+ anchorPayDate: m(r.anchorPayDate),
105
+ anchorEndOfPayPeriod: m(r.anchorEndOfPayPeriod),
108
106
  customName: r.customName,
109
107
  day1: r.day1,
110
108
  day2: r.day2,
@@ -114,10 +112,10 @@ const He = ({
114
112
  });
115
113
  u(S.PAY_SCHEDULE_UPDATED, F), d();
116
114
  }
117
- y("LIST_PAY_SCHEDULES");
115
+ P("LIST_PAY_SCHEDULES");
118
116
  });
119
117
  };
120
- return /* @__PURE__ */ a(
118
+ return /* @__PURE__ */ t(
121
119
  X,
122
120
  {
123
121
  value: {
@@ -132,16 +130,16 @@ const He = ({
132
130
  payPreviewLoading: N,
133
131
  currentPaySchedule: f
134
132
  },
135
- children: /* @__PURE__ */ a("span", { "data-testid": "pay-schedule-edit-form", children: /* @__PURE__ */ a(k, { ...E, children: /* @__PURE__ */ a(Z, { onSubmit: E.handleSubmit(R), children: s || /* @__PURE__ */ I(ee, { flexDirection: "column", children: [
136
- /* @__PURE__ */ a(te, {}),
137
- /* @__PURE__ */ a(ae, {}),
138
- /* @__PURE__ */ a(ne, {}),
139
- /* @__PURE__ */ a(ce, {})
133
+ children: /* @__PURE__ */ t("span", { "data-testid": "pay-schedule-edit-form", children: /* @__PURE__ */ t(k, { ...E, children: /* @__PURE__ */ t(Z, { onSubmit: E.handleSubmit(R), children: s || /* @__PURE__ */ I(ee, { flexDirection: "column", children: [
134
+ /* @__PURE__ */ t(ae, {}),
135
+ /* @__PURE__ */ t(te, {}),
136
+ /* @__PURE__ */ t(ne, {}),
137
+ /* @__PURE__ */ t(ce, {})
140
138
  ] }) }) }) })
141
139
  }
142
140
  );
143
141
  };
144
142
  export {
145
- He as PaySchedule
143
+ Te as PaySchedule
146
144
  };
147
145
  //# sourceMappingURL=PaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Frequency } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayschedules'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, fieldErrors, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.payScheduleList?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors) {\n // TODO: These error messages are not being localized correctly\n fieldErrors.forEach(error => {\n setError(error.key as keyof PayScheduleInputs, { message: error.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n anchorPayDate: formattedAnchorPayDate,\n anchorEndOfPayPeriod: formattedAnchorEndOfPayPeriod,\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n },\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as Frequency,\n anchorPayDate: schedule.anchorPayDate ? new Date(schedule.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod)\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","fieldErrors","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","useEffect","error","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,GAAQ,qBAAqB,GAC7BC,GAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,MAAK,WAAAR,GAAsB,eAAAC,GACzB,UAAAE,EAAM,SAAA,CACT,EAAA,CACF,IAIEK,KAAO,CAAC,EAAE,WAAAR,GAAW,UAAAS,GAAU,eAAAR,QAAsC;AACzE,QAAM,EAAE,mBAAAS,GAAmB,SAAAC,GAAS,aAAAC,GAAa,UAAUC,EAAA,IAAiBC,EAAA,GAEtE,EAAE,MAAMC,EAAA,IAAiBC,EAA8B;AAAA,IAC3D,WAAAhB;AAAA,EAAA,CACD,GAEK,CAACiB,GAAMC,CAAO,IAAIC;AAAA,IACtBJ,EAAa,iBAAiB,WAAW,IAAI,qBAAqB;AAAA,EAAA,GAE9D,CAACK,GAAoBC,CAAqB,IAAIF,EAAiC,IAAI,GACnFG,IAA8C;AAAA,IAClD,WAAWrB,GAAe,aAAa;AAAA,IACvC,eAAeA,GAAe,gBAAgB,IAAI,KAAKA,EAAc,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ClB,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Frequency } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayschedules'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, fieldErrors, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.payScheduleList?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors) {\n // TODO: These error messages are not being localized correctly\n fieldErrors.forEach(error => {\n setError(error.key as keyof PayScheduleInputs, { message: error.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n anchorPayDate: formattedAnchorPayDate,\n anchorEndOfPayPeriod: formattedAnchorEndOfPayPeriod,\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n },\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as Frequency,\n anchorPayDate: schedule.anchorPayDate ? new Date(schedule.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod)\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n requestBody: {\n frequency: payload.frequency,\n anchorPayDate: formatPayloadDate(payload.anchorPayDate),\n anchorEndOfPayPeriod: formatPayloadDate(payload.anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n paySchedules: paySchedules.payScheduleList,\n payPeriodPreview: payPreviewData?.object?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","fieldErrors","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","useEffect","error","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,GAAQ,qBAAqB,GAC7BC,GAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,MAAK,WAAAR,GAAsB,eAAAC,GACzB,UAAAE,EAAM,SAAA,CACT,EAAA,CACF,IAIEK,KAAO,CAAC,EAAE,WAAAR,GAAW,UAAAS,GAAU,eAAAR,QAAsC;AACzE,QAAM,EAAE,mBAAAS,GAAmB,SAAAC,GAAS,aAAAC,GAAa,UAAUC,EAAA,IAAiBC,EAAA,GAEtE,EAAE,MAAMC,EAAA,IAAiBC,EAA8B;AAAA,IAC3D,WAAAhB;AAAA,EAAA,CACD,GAEK,CAACiB,GAAMC,CAAO,IAAIC;AAAA,IACtBJ,EAAa,iBAAiB,WAAW,IAAI,qBAAqB;AAAA,EAAA,GAE9D,CAACK,GAAoBC,CAAqB,IAAIF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gBAAArB,EAACuD,GAAA,EAAK,UAAUlC,EAAY,aAAawB,CAAQ,GAC9C,UAAA1C,KAGC,gBAAAqD,EAACC,IAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,EAAK;AAAA,0BACLC,IAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,20 +1,18 @@
1
1
  import { jsxs as e, Fragment as d, jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import { usePaySchedule as m } from "../usePaySchedule.js";
4
- import "classnames";
5
- import "../../../../shared/constants.js";
6
- import { ActionsLayout as r } from "../../../Common/ActionsLayout/ActionsLayout.js";
4
+ import { ActionsLayout as a } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
5
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- const v = () => {
9
- const { t: n } = l("Company.PaySchedule"), { mode: i, handleAdd: a, handleCancel: c, handleContinue: s } = m(), t = u();
6
+ const S = () => {
7
+ const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: r, handleCancel: i, handleContinue: s } = m(), t = u();
10
8
  return /* @__PURE__ */ e(d, { children: [
11
- i === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(r, { children: [
9
+ c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(a, { children: [
12
10
  /* @__PURE__ */ o(
13
11
  t.Button,
14
12
  {
15
13
  variant: "secondary",
16
14
  onClick: () => {
17
- a();
15
+ r();
18
16
  },
19
17
  children: n("addAnotherPayScheduleCta")
20
18
  }
@@ -30,26 +28,26 @@ const v = () => {
30
28
  }
31
29
  )
32
30
  ] }),
33
- i === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
31
+ c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
34
32
  /* @__PURE__ */ o(
35
33
  t.Button,
36
34
  {
37
35
  variant: "secondary",
38
36
  onClick: () => {
39
- c();
37
+ i();
40
38
  },
41
39
  children: n("actions.cancel")
42
40
  }
43
41
  ),
44
42
  /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
45
43
  ] }),
46
- i === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
44
+ c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
47
45
  /* @__PURE__ */ o(
48
46
  t.Button,
49
47
  {
50
48
  variant: "secondary",
51
49
  onClick: () => {
52
- c();
50
+ i();
53
51
  },
54
52
  children: n("actions.cancel")
55
53
  }
@@ -59,6 +57,6 @@ const v = () => {
59
57
  ] });
60
58
  };
61
59
  export {
62
- v as Actions
60
+ S as Actions
63
61
  };
64
62
  //# sourceMappingURL=Actions.js.map