@gusto/embedded-react-sdk 0.13.1 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (636) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/_virtual/_commonjsHelpers.js +7 -0
  3. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/dist/_virtual/index.js +8 -0
  5. package/dist/_virtual/index.js.map +1 -0
  6. package/dist/assets/icons/close.svg.js +10 -0
  7. package/dist/assets/icons/close.svg.js.map +1 -0
  8. package/dist/assets/icons/download-cloud.svg.js +10 -0
  9. package/dist/assets/icons/download-cloud.svg.js.map +1 -0
  10. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  11. package/dist/components/Common/DataView/DataCards/DataCards.js +28 -23
  12. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  13. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +6 -4
  14. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  15. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +4 -1
  16. package/dist/components/Common/DataView/DataTable/DataTable.js +70 -50
  17. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  18. package/dist/components/Common/DataView/DataView.d.ts +7 -3
  19. package/dist/components/Common/DataView/DataView.js +23 -19
  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/Fields/CheckboxField/CheckboxField.d.ts +1 -1
  25. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +15 -9
  26. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
  27. package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +2 -2
  28. package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +21 -15
  29. package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
  30. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +2 -2
  31. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +19 -13
  32. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
  33. package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +1 -1
  34. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +24 -18
  35. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
  36. package/dist/components/Common/Fields/NumberInputField/NumberInputField.d.ts +1 -1
  37. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +18 -12
  38. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
  39. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +2 -2
  40. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +19 -13
  41. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  42. package/dist/components/Common/Fields/SelectField/SelectField.d.ts +2 -2
  43. package/dist/components/Common/Fields/SelectField/SelectField.js +19 -13
  44. package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
  45. package/dist/components/Common/Fields/SwitchField/SwitchField.d.ts +1 -1
  46. package/dist/components/Common/Fields/SwitchField/SwitchField.js +15 -9
  47. package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
  48. package/dist/components/Common/Fields/TextInputField/TextInputField.d.ts +1 -1
  49. package/dist/components/Common/Fields/TextInputField/TextInputField.js +15 -9
  50. package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
  51. package/dist/components/Common/Fields/hooks/useField.d.ts +8 -7
  52. package/dist/components/Common/Fields/hooks/useField.js +33 -27
  53. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  54. package/dist/components/Common/ReorderableList/DropZone.js +5 -5
  55. package/dist/components/Common/ReorderableList/ReorderableItem.js +8 -8
  56. package/dist/components/Common/ReorderableList/ReorderableList.js +5 -5
  57. package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
  58. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  59. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  60. package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
  61. package/dist/components/Common/UI/Alert/Alert.js +28 -21
  62. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  63. package/dist/components/Common/UI/Alert/Alert.module.scss.js +13 -7
  64. package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
  65. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +10 -0
  66. package/dist/components/Common/UI/Alert/AlertTypes.js +7 -0
  67. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -0
  68. package/dist/components/Common/UI/Badge/Badge.js +10 -10
  69. package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
  70. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
  71. package/dist/components/Common/UI/Badge/BadgeTypes.js +7 -0
  72. package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -0
  73. package/dist/components/Common/UI/Button/Button.d.ts +1 -1
  74. package/dist/components/Common/UI/Button/Button.js +30 -27
  75. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  76. package/dist/components/Common/UI/Button/ButtonIcon.js +6 -6
  77. package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
  78. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +17 -0
  79. package/dist/components/Common/UI/Button/ButtonTypes.js +14 -0
  80. package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -0
  81. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  82. package/dist/components/Common/UI/Checkbox/Checkbox.d.ts +1 -1
  83. package/dist/components/Common/UI/Checkbox/Checkbox.js +51 -49
  84. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  85. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +12 -1
  86. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js +8 -0
  87. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -0
  88. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  89. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +72 -69
  90. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
  91. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +9 -0
  92. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js +10 -0
  93. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -0
  94. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -2
  95. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +2 -2
  96. package/dist/components/Common/UI/Dialog/Dialog.d.ts +2 -0
  97. package/dist/components/Common/UI/Dialog/Dialog.js +84 -0
  98. package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -0
  99. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +18 -0
  100. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js.map +1 -0
  101. package/dist/components/Common/UI/Dialog/DialogTypes.d.ts +52 -0
  102. package/dist/components/Common/UI/Dialog/DialogTypes.js +10 -0
  103. package/dist/components/Common/UI/Dialog/DialogTypes.js.map +1 -0
  104. package/dist/components/Common/UI/Dialog/index.d.ts +4 -0
  105. package/dist/components/Common/UI/Input/Input.d.ts +1 -1
  106. package/dist/components/Common/UI/Input/Input.js +38 -27
  107. package/dist/components/Common/UI/Input/Input.js.map +1 -1
  108. package/dist/components/Common/UI/Input/InputTypes.d.ts +7 -0
  109. package/dist/components/Common/UI/Input/InputTypes.js +7 -0
  110. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -0
  111. package/dist/components/Common/UI/Menu/Menu.d.ts +1 -1
  112. package/dist/components/Common/UI/Menu/Menu.js +32 -30
  113. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  114. package/dist/components/Common/UI/Menu/Menu.module.scss.js +1 -1
  115. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +6 -0
  116. package/dist/components/Common/UI/Menu/MenuTypes.js +7 -0
  117. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -0
  118. package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +2 -2
  119. package/dist/components/Common/UI/Radio/Radio.d.ts +1 -1
  120. package/dist/components/Common/UI/Radio/Radio.js +50 -48
  121. package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
  122. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +7 -0
  123. package/dist/components/Common/UI/Radio/RadioTypes.js +8 -0
  124. package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -0
  125. package/dist/components/Common/UI/RadioGroup/RadioGroup.d.ts +1 -1
  126. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +61 -58
  127. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  128. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +9 -0
  129. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js +10 -0
  130. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -0
  131. package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -2
  132. package/dist/components/Common/UI/Switch/Switch.d.ts +1 -1
  133. package/dist/components/Common/UI/Switch/Switch.js +48 -46
  134. package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
  135. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +9 -2
  136. package/dist/components/Common/UI/Switch/SwitchTypes.js +8 -0
  137. package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -0
  138. package/dist/components/Common/UI/Table/Table.d.ts +1 -1
  139. package/dist/components/Common/UI/Table/Table.js +15 -9
  140. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  141. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  142. package/dist/components/Common/UI/Table/TableTypes.d.ts +14 -0
  143. package/dist/components/Common/UI/Table/TableTypes.js +7 -0
  144. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -0
  145. package/dist/components/Common/UI/Text/Text.d.ts +1 -1
  146. package/dist/components/Common/UI/Text/Text.js +23 -25
  147. package/dist/components/Common/UI/Text/Text.js.map +1 -1
  148. package/dist/components/Common/UI/Text/TextTypes.d.ts +7 -0
  149. package/dist/components/Common/UI/Text/TextTypes.js +8 -0
  150. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -0
  151. package/dist/components/Common/UI/TextInput/TextInput.d.ts +1 -1
  152. package/dist/components/Common/UI/TextInput/TextInput.js +53 -49
  153. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  154. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +14 -1
  155. package/dist/components/Common/UI/TextInput/TextInputTypes.js +9 -0
  156. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -0
  157. package/dist/components/Common/UI/hooks/useFieldIds.d.ts +2 -1
  158. package/dist/components/Common/UI/hooks/useFieldIds.js +11 -6
  159. package/dist/components/Common/UI/hooks/useFieldIds.js.map +1 -1
  160. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -6
  161. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  162. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
  163. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  164. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
  165. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  166. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +3 -2
  167. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  168. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
  169. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  170. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  171. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  172. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
  173. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  174. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +6 -5
  175. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  176. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +11 -10
  177. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  178. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  179. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  180. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  181. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  182. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  183. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -9
  184. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  185. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  186. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  187. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +8 -9
  188. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  189. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  190. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  191. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
  192. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  193. package/dist/components/Company/BankAccount/stateMachine.d.ts +4 -4
  194. package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
  195. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
  196. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  197. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
  198. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  199. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  200. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  201. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -6
  202. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  203. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  204. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  205. package/dist/components/Company/DocumentSigner/assignSignatoryState.d.ts +1 -1
  206. package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
  207. package/dist/components/Company/DocumentSigner/stateMachine.d.ts +5 -5
  208. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
  209. package/dist/components/Company/FederalTaxes/Actions.js +5 -6
  210. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  211. package/dist/components/Company/FederalTaxes/FederalTaxes.js +13 -12
  212. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  213. package/dist/components/Company/FederalTaxes/Form.js +3 -4
  214. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  215. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
  216. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  217. package/dist/components/Company/Industry/Actions.js +2 -3
  218. package/dist/components/Company/Industry/Actions.js.map +1 -1
  219. package/dist/components/Company/Industry/Context.js +6 -7
  220. package/dist/components/Company/Industry/Context.js.map +1 -1
  221. package/dist/components/Company/Industry/Edit.js +4 -5
  222. package/dist/components/Company/Industry/Edit.js.map +1 -1
  223. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  224. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  225. package/dist/components/Company/Locations/LocationForm/Form.js +6 -5
  226. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  227. package/dist/components/Company/Locations/LocationForm/LocationForm.js +11 -10
  228. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  229. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  230. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  231. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -7
  232. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  233. package/dist/components/Company/Locations/LocationsList/List.js +2 -3
  234. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  235. package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -6
  236. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  237. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  238. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  239. package/dist/components/Company/Locations/stateMachine.d.ts +3 -3
  240. package/dist/components/Company/Locations/stateMachine.js.map +1 -1
  241. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.d.ts +10 -10
  242. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  243. package/dist/components/Company/OnboardingOverview/Completed.js +10 -11
  244. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  245. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -7
  246. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  247. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
  248. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  249. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  250. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  251. package/dist/components/Company/PaySchedule/PaySchedule.js +34 -33
  252. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  253. package/dist/components/Company/PaySchedule/_parts/Actions.js +9 -10
  254. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  255. package/dist/components/Company/PaySchedule/_parts/Edit.js +17 -16
  256. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  257. package/dist/components/Company/PaySchedule/_parts/Head.js +6 -7
  258. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  259. package/dist/components/Company/PaySchedule/_parts/List.js +11 -12
  260. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  261. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  262. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  263. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  264. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  265. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  266. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  267. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
  268. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  269. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
  270. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  271. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  272. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  273. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +3 -3
  274. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  275. package/dist/components/Contractor/Address/Address.js +5 -4
  276. package/dist/components/Contractor/Address/Address.js.map +1 -1
  277. package/dist/components/Contractor/Address/Form.js +4 -3
  278. package/dist/components/Contractor/Address/Form.js.map +1 -1
  279. package/dist/components/Contractor/Address/useAddress.js +5 -6
  280. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  281. package/dist/components/Contractor/ContractorList/index.js +17 -17
  282. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +7 -7
  283. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  284. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -6
  285. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  286. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +1 -1
  287. package/dist/components/Contractor/Profile/ContractorProfileForm.js +59 -56
  288. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
  289. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +8 -0
  290. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js.map +1 -0
  291. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +2 -0
  292. package/dist/components/Contractor/Profile/useContractorProfile.js +94 -93
  293. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  294. package/dist/components/Contractor/Submit/Submit.js +1 -1
  295. package/dist/components/Employee/Compensation/Actions.js +1 -1
  296. package/dist/components/Employee/Compensation/Edit.js +12 -12
  297. package/dist/components/Employee/Compensation/List.js +22 -23
  298. package/dist/components/Employee/Compensation/List.js.map +1 -1
  299. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  300. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  301. package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +6 -0
  302. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
  303. package/dist/components/Employee/Deductions/stateMachine.d.ts +5 -5
  304. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  305. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -7
  306. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  307. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +8 -7
  308. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  309. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  310. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  311. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  312. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  313. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +10 -9
  314. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  315. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  316. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  317. package/dist/components/Employee/DocumentSigner/stateMachine.d.ts +3 -3
  318. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
  319. package/dist/components/Employee/EmployeeList/Actions.js +2 -3
  320. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  321. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  322. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  323. package/dist/components/Employee/EmployeeList/Head.js +5 -6
  324. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  325. package/dist/components/Employee/EmployeeList/List.js +12 -12
  326. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  327. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  328. package/dist/components/Employee/FederalTaxes/Actions.js +6 -7
  329. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  330. package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -12
  331. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  332. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  333. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  334. package/dist/components/Employee/Landing/Landing.js +8 -8
  335. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.d.ts +9 -9
  336. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  337. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  338. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  339. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  340. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
  341. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -9
  342. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  343. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  344. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  345. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  346. package/dist/components/Employee/Profile/Actions.js +6 -7
  347. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  348. package/dist/components/Employee/Profile/AdminPersonalDetails.js +31 -29
  349. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  350. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +8 -0
  351. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js.map +1 -0
  352. package/dist/components/Employee/Profile/HomeAddress.js +6 -5
  353. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  354. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +22 -21
  355. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  356. package/dist/components/Employee/Profile/Profile.js +66 -63
  357. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  358. package/dist/components/Employee/Profile/useProfile.js +3 -4
  359. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  360. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts +5 -5
  361. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
  362. package/dist/components/Employee/StateTaxes/Actions.js +7 -8
  363. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  364. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  365. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  366. package/dist/components/Employee/Taxes/Actions.js +8 -9
  367. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  368. package/dist/components/Employee/Taxes/FederalForm.js +12 -13
  369. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  370. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  371. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  372. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +3 -1
  373. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +55 -60
  374. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  375. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  376. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +85 -90
  377. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  378. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +47 -48
  379. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  380. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +20 -2
  381. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +309 -101
  382. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  383. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +16 -0
  384. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js.map +1 -0
  385. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +7 -0
  386. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +58 -0
  387. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -0
  388. package/dist/components/Payroll/PayrollEditEmployee/index.d.ts +4 -0
  389. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +19 -0
  390. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +114 -0
  391. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -0
  392. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +15 -0
  393. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +193 -0
  394. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -0
  395. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js +8 -0
  396. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js.map +1 -0
  397. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +7 -0
  398. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +41 -0
  399. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -0
  400. package/dist/components/Payroll/PayrollList/PayrollList.js +22 -18
  401. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  402. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +5 -1
  403. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +94 -53
  404. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  405. package/dist/components/Payroll/PayrollList/types.d.ts +1 -0
  406. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +3 -2
  407. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +103 -27
  408. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  409. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +16 -1
  410. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +408 -54
  411. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  412. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +6 -0
  413. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +9 -3
  414. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +86 -24
  415. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
  416. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +6 -4
  417. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -1
  418. package/dist/components/Payroll/helpers.d.ts +21 -1
  419. package/dist/components/Payroll/helpers.js +166 -123
  420. package/dist/components/Payroll/helpers.js.map +1 -1
  421. package/dist/components/Payroll/index.d.ts +2 -0
  422. package/dist/components/Payroll/index.js +10 -6
  423. package/dist/components/Payroll/index.js.map +1 -1
  424. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +21 -19
  425. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  426. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  427. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +78 -0
  428. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +57 -0
  429. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -0
  430. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  431. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  432. package/dist/contexts/GustoProvider/GustoProvider.js +17 -12
  433. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  434. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -10
  435. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  436. package/dist/contexts/ThemeProvider/theme.d.ts +2 -0
  437. package/dist/contexts/ThemeProvider/theme.js +10 -8
  438. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  439. package/dist/helpers/applyMissingDefaults.d.ts +5 -0
  440. package/dist/helpers/applyMissingDefaults.js +10 -0
  441. package/dist/helpers/applyMissingDefaults.js.map +1 -0
  442. package/dist/helpers/readableStreamToBlob.d.ts +1 -0
  443. package/dist/helpers/readableStreamToBlob.js +17 -0
  444. package/dist/helpers/readableStreamToBlob.js.map +1 -0
  445. package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.d.ts +2 -4
  446. package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.js.map +1 -1
  447. package/dist/i18n/I18n.js +9 -9
  448. package/dist/i18n/I18n.js.map +1 -1
  449. package/dist/i18n/en/Employee.Deductions.json.js +68 -60
  450. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  451. package/dist/i18n/en/Employee.Profile.json.js +32 -30
  452. package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
  453. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +13 -13
  454. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +34 -14
  455. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  456. package/dist/i18n/en/Payroll.PayrollHistory.json.js +22 -0
  457. package/dist/i18n/en/Payroll.PayrollHistory.json.js.map +1 -0
  458. package/dist/i18n/en/Payroll.PayrollLanding.json.js +12 -0
  459. package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -0
  460. package/dist/i18n/en/Payroll.PayrollList.json.js +14 -8
  461. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  462. package/dist/i18n/en/Payroll.PayrollOverview.json.js +50 -14
  463. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  464. package/dist/i18n/en/Payroll.PayrollReceipts.json.js +16 -0
  465. package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -0
  466. package/dist/i18n/en/Payroll.RunPayroll.json.js +8 -0
  467. package/dist/i18n/en/Payroll.RunPayroll.json.js.map +1 -0
  468. package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js +40 -0
  469. package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js.map +1 -0
  470. package/dist/node_modules/@react-dnd/asap/dist/RawTask.js +18 -0
  471. package/dist/node_modules/@react-dnd/asap/dist/RawTask.js.map +1 -0
  472. package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js +17 -0
  473. package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js.map +1 -0
  474. package/dist/node_modules/@react-dnd/asap/dist/asap.js +10 -0
  475. package/dist/node_modules/@react-dnd/asap/dist/asap.js.map +1 -0
  476. package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js +63 -0
  477. package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js.map +1 -0
  478. package/dist/node_modules/@react-dnd/invariant/dist/index.js +23 -0
  479. package/dist/node_modules/@react-dnd/invariant/dist/index.js.map +1 -0
  480. package/dist/node_modules/@react-dnd/shallowequal/dist/index.js +26 -0
  481. package/dist/node_modules/@react-dnd/shallowequal/dist/index.js.map +1 -0
  482. package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js +71 -0
  483. package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js.map +1 -0
  484. package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js +55 -0
  485. package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js.map +1 -0
  486. package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js +19 -0
  487. package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js.map +1 -0
  488. package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js +43 -0
  489. package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js.map +1 -0
  490. package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js +18 -0
  491. package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js.map +1 -0
  492. package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js +14 -0
  493. package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js.map +1 -0
  494. package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js +13 -0
  495. package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js.map +1 -0
  496. package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js +10 -0
  497. package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js.map +1 -0
  498. package/dist/node_modules/dnd-core/dist/actions/registry.js +44 -0
  499. package/dist/node_modules/dnd-core/dist/actions/registry.js.map +1 -0
  500. package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js +42 -0
  501. package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js.map +1 -0
  502. package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js +116 -0
  503. package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js.map +1 -0
  504. package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js +97 -0
  505. package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js.map +1 -0
  506. package/dist/node_modules/dnd-core/dist/contracts.js +22 -0
  507. package/dist/node_modules/dnd-core/dist/contracts.js.map +1 -0
  508. package/dist/node_modules/dnd-core/dist/createDragDropManager.js +20 -0
  509. package/dist/node_modules/dnd-core/dist/createDragDropManager.js.map +1 -0
  510. package/dist/node_modules/dnd-core/dist/interfaces.js +8 -0
  511. package/dist/node_modules/dnd-core/dist/interfaces.js.map +1 -0
  512. package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js +31 -0
  513. package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js.map +1 -0
  514. package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js +51 -0
  515. package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js.map +1 -0
  516. package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js +79 -0
  517. package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js.map +1 -0
  518. package/dist/node_modules/dnd-core/dist/reducers/index.js +43 -0
  519. package/dist/node_modules/dnd-core/dist/reducers/index.js.map +1 -0
  520. package/dist/node_modules/dnd-core/dist/reducers/refCount.js +17 -0
  521. package/dist/node_modules/dnd-core/dist/reducers/refCount.js.map +1 -0
  522. package/dist/node_modules/dnd-core/dist/reducers/stateId.js +7 -0
  523. package/dist/node_modules/dnd-core/dist/reducers/stateId.js.map +1 -0
  524. package/dist/node_modules/dnd-core/dist/utils/coords.js +27 -0
  525. package/dist/node_modules/dnd-core/dist/utils/coords.js.map +1 -0
  526. package/dist/node_modules/dnd-core/dist/utils/dirtiness.js +13 -0
  527. package/dist/node_modules/dnd-core/dist/utils/dirtiness.js.map +1 -0
  528. package/dist/node_modules/dnd-core/dist/utils/equality.js +18 -0
  529. package/dist/node_modules/dnd-core/dist/utils/equality.js.map +1 -0
  530. package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js +8 -0
  531. package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js.map +1 -0
  532. package/dist/node_modules/dnd-core/dist/utils/js_utils.js +37 -0
  533. package/dist/node_modules/dnd-core/dist/utils/js_utils.js.map +1 -0
  534. package/dist/node_modules/dnd-core/dist/utils/matchesType.js +9 -0
  535. package/dist/node_modules/dnd-core/dist/utils/matchesType.js.map +1 -0
  536. package/dist/node_modules/fast-deep-equal/index.js +32 -0
  537. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  538. package/dist/node_modules/react-dnd/dist/core/DndContext.js +8 -0
  539. package/dist/node_modules/react-dnd/dist/core/DndContext.js.map +1 -0
  540. package/dist/node_modules/react-dnd/dist/core/DndProvider.js +67 -0
  541. package/dist/node_modules/react-dnd/dist/core/DndProvider.js.map +1 -0
  542. package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js +12 -0
  543. package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js.map +1 -0
  544. package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +23 -0
  545. package/dist/node_modules/react-dnd/dist/hooks/useCollector.js.map +1 -0
  546. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +26 -0
  547. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js.map +1 -0
  548. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +22 -0
  549. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js.map +1 -0
  550. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +21 -0
  551. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js.map +1 -0
  552. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +20 -0
  553. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js.map +1 -0
  554. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +23 -0
  555. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js.map +1 -0
  556. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +16 -0
  557. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js.map +1 -0
  558. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +14 -0
  559. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js.map +1 -0
  560. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +24 -0
  561. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js.map +1 -0
  562. package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js +11 -0
  563. package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js.map +1 -0
  564. package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js +22 -0
  565. package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js.map +1 -0
  566. package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js +13 -0
  567. package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js.map +1 -0
  568. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js +14 -0
  569. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js.map +1 -0
  570. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js +17 -0
  571. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js.map +1 -0
  572. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js +19 -0
  573. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js.map +1 -0
  574. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js +19 -0
  575. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js.map +1 -0
  576. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js +16 -0
  577. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js.map +1 -0
  578. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js +24 -0
  579. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js.map +1 -0
  580. package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js +6 -0
  581. package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  582. package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js +21 -0
  583. package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js.map +1 -0
  584. package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js +11 -0
  585. package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js.map +1 -0
  586. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +89 -0
  587. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js.map +1 -0
  588. package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js +60 -0
  589. package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js.map +1 -0
  590. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +88 -0
  591. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js.map +1 -0
  592. package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js +58 -0
  593. package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js.map +1 -0
  594. package/dist/node_modules/react-dnd/dist/internals/isRef.js +10 -0
  595. package/dist/node_modules/react-dnd/dist/internals/isRef.js.map +1 -0
  596. package/dist/node_modules/react-dnd/dist/internals/registration.js +19 -0
  597. package/dist/node_modules/react-dnd/dist/internals/registration.js.map +1 -0
  598. package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js +47 -0
  599. package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js.map +1 -0
  600. package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js +11 -0
  601. package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js.map +1 -0
  602. package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js +23 -0
  603. package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js.map +1 -0
  604. package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js +275 -0
  605. package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js.map +1 -0
  606. package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js +60 -0
  607. package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js.map +1 -0
  608. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js +44 -0
  609. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js.map +1 -0
  610. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js +11 -0
  611. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js.map +1 -0
  612. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js +25 -0
  613. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js.map +1 -0
  614. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js +49 -0
  615. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js.map +1 -0
  616. package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js +8 -0
  617. package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js.map +1 -0
  618. package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js +71 -0
  619. package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js.map +1 -0
  620. package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js +23 -0
  621. package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js.map +1 -0
  622. package/dist/node_modules/react-dnd-html5-backend/dist/index.js +8 -0
  623. package/dist/node_modules/react-dnd-html5-backend/dist/index.js.map +1 -0
  624. package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js +23 -0
  625. package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js.map +1 -0
  626. package/dist/node_modules/redux/es/redux.js +159 -0
  627. package/dist/node_modules/redux/es/redux.js.map +1 -0
  628. package/dist/shared/constants.d.ts +38 -0
  629. package/dist/shared/constants.js +67 -37
  630. package/dist/shared/constants.js.map +1 -1
  631. package/dist/style.css +1 -1
  632. package/dist/types/Helpers.d.ts +7 -0
  633. package/dist/types/i18next.d.ts +202 -20
  634. package/package.json +17 -16
  635. package/dist/i18n/en/Payroll.PayrollHistoryList.json.js +0 -16
  636. package/dist/i18n/en/Payroll.PayrollHistoryList.json.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../src/components/Payroll/helpers.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { PayrollShowFixedCompensations } from '@gusto/embedded-api/models/components/payrollshow'\nimport { useCallback } from 'react'\nimport type { TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Compensation, MinimumWages } from '@gusto/embedded-api/models/components/compensation'\nimport type { PayrollEmployeeCompensationsType } from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport { formatPayRate } from '@/helpers/formattedStrings'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\n\nconst REGULAR_HOURS_NAME = 'regular hours'\n\n// Utility to get the primary job from an employee\nexport const getPrimaryJob = (employee: Employee) => {\n return employee.jobs?.find(job => job.primary) || employee.jobs?.[0] || null\n}\n\nconst roundToSixDecimals = (value: number): number => {\n return Math.round(value * 1_000_000) / 1_000_000\n}\n\nconst roundToTwoDecimals = (value: number): number => {\n return Math.round(value * 100) / 100\n}\n\nconst isRegularHours = (compensationName: string): boolean => {\n return compensationName.toLowerCase() === REGULAR_HOURS_NAME\n}\n\nconst PAY_PERIOD_HOURS_MAPPINGS: Record<string, number> = {\n Daily: 8.0,\n 'Every week': 40.0,\n 'Every other week': 80.0,\n 'Twice per month': 86.666667,\n Monthly: 173.333333,\n Quarterly: 520.0,\n Semiannually: 1040.0,\n Annually: 2080.0,\n}\n\nexport const formatEmployeePayRate = ({\n employee,\n t,\n locale = 'en-US',\n}: {\n employee?: Employee\n t: TFunction\n locale?: string\n}) => {\n if (!employee?.jobs) {\n return null\n }\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return null\n }\n\n const jobCompensation = primaryJob.compensations[0]\n if (!jobCompensation) {\n return null\n }\n if (!jobCompensation.rate || parseFloat(jobCompensation.rate) === 0) {\n return null\n }\n\n const rate = parseFloat(jobCompensation.rate)\n const paymentUnit = jobCompensation.paymentUnit || 'Hour'\n\n return formatPayRate({ rate, paymentUnit, t, locale })\n}\n\nexport const useFormatEmployeePayRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (employee?: Employee) => {\n return formatEmployeePayRate({ employee, t, locale })\n },\n [t, locale],\n )\n}\n\nexport const getEmployeePayRateInfo = (employee: Employee | undefined) => {\n if (!employee?.jobs) {\n return null\n }\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return null\n }\n\n const jobCompensation = primaryJob.compensations[0]\n if (!jobCompensation) {\n return null\n }\n if (!jobCompensation.rate || parseFloat(jobCompensation.rate) === 0) {\n return null\n }\n\n const rate = parseFloat(jobCompensation.rate)\n const paymentUnit = jobCompensation.paymentUnit || 'Hour'\n\n return { rate, paymentUnit }\n}\n\nexport const getRegularHours = (compensation: PayrollEmployeeCompensationsType) => {\n if (!compensation.hourlyCompensations) return 0\n\n return compensation.hourlyCompensations\n .filter(hourlyCompensation => hourlyCompensation.name?.toLowerCase() === 'regular hours')\n .reduce((sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'), 0)\n}\n\nexport const getTotalPtoHours = (compensation: PayrollEmployeeCompensationsType) => {\n if (!compensation.paidTimeOff) {\n return 0\n }\n return compensation.paidTimeOff.reduce((sum, pto) => sum + parseFloat(pto.hours || '0'), 0)\n}\n\nexport const getAdditionalEarnings = (compensation: PayrollEmployeeCompensationsType) => {\n if (!compensation.fixedCompensations) {\n return 0\n }\n\n return compensation.fixedCompensations\n .filter(fixedCompensation => {\n const name = fixedCompensation.name?.toLowerCase() || ''\n const amount = parseFloat(fixedCompensation.amount || '0')\n return name !== 'reimbursement' && name !== 'minimum wage adjustment' && amount > 0\n })\n .reduce((sum, fixedCompensation) => sum + parseFloat(fixedCompensation.amount || '0'), 0)\n}\n\nexport const getReimbursements = (compensation: PayrollEmployeeCompensationsType) => {\n if (!compensation.fixedCompensations) {\n return 0\n }\n\n const reimbursementComp = compensation.fixedCompensations.find(\n fixedCompensation => fixedCompensation.name?.toLowerCase() === 'reimbursement',\n )\n return reimbursementComp ? parseFloat(reimbursementComp.amount || '0') : 0\n}\n\nexport const formatHoursDisplay = (hours: number): string => {\n const rounded = roundToTwoDecimals(hours)\n\n if (rounded % 1 === 0) {\n return `${rounded}.0`\n }\n\n return rounded.toString()\n}\n\nconst getHoursInPayPeriod = (paySchedule: PayScheduleObject): number => {\n if (!paySchedule.frequency) {\n return 0\n }\n\n return PAY_PERIOD_HOURS_MAPPINGS[paySchedule.frequency] || 0\n}\n\nconst getEffectiveCompensation = (\n compensations: Compensation[],\n effectiveDate: Date,\n): Compensation | null => {\n if (!compensations.length) return null\n\n const sorted = [...compensations].sort(\n (a, b) =>\n (a.effectiveDate ? new Date(a.effectiveDate).getTime() : 0) -\n (b.effectiveDate ? new Date(b.effectiveDate).getTime() : 0),\n )\n\n for (let i = sorted.length - 1; i >= 0; i--) {\n const currentDateString = sorted[i]?.effectiveDate\n const currentDate = currentDateString ? new Date(currentDateString) : null\n if (currentDate && currentDate <= effectiveDate) {\n return sorted[i] || null\n }\n }\n\n return sorted[0] || null\n}\n\nconst getEffectiveMinimumWage = (\n minimumWages: MinimumWages[],\n effectiveDate: Date,\n): MinimumWages | null => {\n if (!minimumWages.length) return null\n\n const sorted = [...minimumWages].sort(\n (a, b) =>\n (a.effectiveDate ? new Date(a.effectiveDate).getTime() : 0) -\n (b.effectiveDate ? new Date(b.effectiveDate).getTime() : 0),\n )\n\n for (let i = sorted.length - 1; i >= 0; i--) {\n const currentDateString = sorted[i]?.effectiveDate\n const currentDate = currentDateString ? new Date(currentDateString) : null\n if (currentDate && currentDate <= effectiveDate) {\n return sorted[i] || null\n }\n }\n\n return sorted[0] || null\n}\n\nconst isSalaried = (compensation: Compensation): boolean => {\n return compensation.flsaStatus === 'Exempt' || compensation.flsaStatus === 'Salaried Nonexempt'\n}\n\nconst getTotalTipCompensations = (fixedCompensations: PayrollShowFixedCompensations[]): number => {\n if (!fixedCompensations.length) return 0\n\n return fixedCompensations\n .filter(fixedCompensation => {\n const name = fixedCompensation.name?.toLowerCase()\n const amount = parseFloat(fixedCompensation.amount || '0')\n return (name === 'paycheck tips' || name === 'cash tips') && amount > 0\n })\n .reduce((sum, fixedCompensation) => sum + parseFloat(fixedCompensation.amount || '0'), 0)\n}\n\nconst calculateHourlyRate = (compensation: Compensation): number => {\n const rate = parseFloat(compensation.rate || '0')\n const paymentUnit = compensation.paymentUnit || 'Hour'\n\n switch (paymentUnit) {\n case 'Hour':\n return rate\n case 'Year':\n return rate / 2080 // 52 weeks * 40 hours\n case 'Month':\n return rate / 173.333333\n case 'Week':\n return rate / 40\n case 'Paycheck':\n return 0 // Paycheck rate is 0 for hourly calculation\n default:\n return rate\n }\n}\n\nconst getHourlyRateForJob = (employee: Employee, jobUuid: string, effectiveDate: Date): number => {\n const job = employee.jobs?.find(j => j.uuid === jobUuid)\n if (!job?.compensations) {\n return 0\n }\n\n const compensation = getEffectiveCompensation(job.compensations, effectiveDate)\n return compensation ? calculateHourlyRate(compensation) : 0\n}\n\nconst getPrimaryHourlyRate = (employee: Employee, effectiveDate: Date): number => {\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return 0\n }\n\n const compensation = getEffectiveCompensation(primaryJob.compensations, effectiveDate)\n return compensation ? calculateHourlyRate(compensation) : 0\n}\n\nconst getTotalOutstandingPtoHours = (compensation: PayrollEmployeeCompensationsType): number => {\n if (!compensation.paidTimeOff) {\n return 0\n }\n\n return compensation.paidTimeOff.reduce(\n (sum, paidTimeOff) => sum + parseFloat(paidTimeOff.finalPayoutUnusedHoursInput || '0'),\n 0,\n )\n}\n\nconst getPtoHours = (\n compensation: PayrollEmployeeCompensationsType,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n offCycle: boolean,\n): number => {\n const regularPtoHours = getTotalPtoHours(compensation)\n\n if (offCycle) {\n const outstandingPtoHours = getTotalOutstandingPtoHours(compensation)\n return regularPtoHours + outstandingPtoHours\n }\n\n if (isSalariedWithExpectedHours) {\n return Math.min(hoursInPayPeriod, regularPtoHours)\n }\n\n return regularPtoHours\n}\n\nconst calculateMinimumWageAdjustment = (\n primaryCompensation: Compensation,\n compensation: PayrollEmployeeCompensationsType,\n effectiveDate: Date,\n): number => {\n if (!primaryCompensation.adjustForMinimumWage) return 0\n\n const effectiveMinWage = getEffectiveMinimumWage(\n primaryCompensation.minimumWages || [],\n effectiveDate,\n )\n if (!effectiveMinWage) {\n return 0\n }\n\n const totalHours =\n compensation.hourlyCompensations?.reduce(\n (sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'),\n 0,\n ) || 0\n\n const hourlyRate = calculateHourlyRate(primaryCompensation)\n\n const totalTipCredit = (parseFloat(effectiveMinWage.wage || '0') - hourlyRate) * totalHours\n const totalTips = getTotalTipCompensations(compensation.fixedCompensations || [])\n\n return Math.max(0, totalTipCredit - totalTips)\n}\n\nconst calculateRegularPlusOvertimePay = (\n compensation: PayrollEmployeeCompensationsType,\n employee: Employee,\n effectiveDate: Date,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n ptoHours: number,\n isOffCycle: boolean,\n): number => {\n if (!isOffCycle && isSalariedWithExpectedHours) {\n const primaryHourlyRate = getPrimaryHourlyRate(employee, effectiveDate)\n return primaryHourlyRate * (hoursInPayPeriod - ptoHours)\n }\n\n if (!compensation.hourlyCompensations || !employee.jobs) {\n return 0\n }\n\n const regularRatePay = compensation.hourlyCompensations.reduce((sum, hc) => {\n const hours = parseFloat(hc.hours || '0')\n const hourlyRate = getHourlyRateForJob(employee, hc.jobUuid || '', effectiveDate)\n return sum + hours * hourlyRate\n }, 0)\n\n const totalHours = compensation.hourlyCompensations.reduce((sum, hc) => {\n return sum + parseFloat(hc.hours || '0')\n }, 0)\n\n if (totalHours === 0) return regularRatePay\n\n const overtimeWeightedRate = roundToSixDecimals(regularRatePay / totalHours)\n\n // Calculate overtime pay for non-regular hours\n const overtimePay = compensation.hourlyCompensations\n .filter(hc => !isRegularHours(hc.name || ''))\n .reduce((sum, hc) => {\n const hours = parseFloat(hc.hours || '0')\n const multiplier = hc.compensationMultiplier || 1\n return sum + hours * overtimeWeightedRate * (multiplier - 1)\n }, 0)\n\n return regularRatePay + overtimePay\n}\n\nconst calculatePtoPay = (\n compensation: PayrollEmployeeCompensationsType,\n employee: Employee,\n effectiveDate: Date,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n offCycle: boolean,\n): number => {\n const ptoHours = getPtoHours(\n compensation,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n offCycle,\n )\n const primaryHourlyRate = getPrimaryHourlyRate(employee, effectiveDate)\n return ptoHours * primaryHourlyRate\n}\n\nconst isSalariedWithPayPeriodExpectedHours = (\n compensation: PayrollEmployeeCompensationsType,\n isSalaried: boolean,\n hoursInPayPeriod: number,\n): boolean => {\n if (!isSalaried) return false\n\n const regularHourlyCompensation = compensation.hourlyCompensations?.find(hourlyCompensation =>\n isRegularHours(hourlyCompensation.name || ''),\n )\n\n if (!regularHourlyCompensation) return false\n\n const regularHours = parseFloat(regularHourlyCompensation.hours || '0')\n return regularHours === hoursInPayPeriod\n}\n\nexport const calculateGrossPay = (\n compensation: PayrollEmployeeCompensationsType,\n employee: Employee,\n compensationEffectiveDateString?: string,\n paySchedule?: PayScheduleObject,\n isOffCycle: boolean = false,\n): number => {\n if (compensation.excluded) {\n return 0\n }\n\n const compensationEffectiveDate = compensationEffectiveDateString\n ? new Date(compensationEffectiveDateString)\n : new Date()\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return 0\n }\n\n const primaryCompensation = getEffectiveCompensation(\n primaryJob.compensations,\n compensationEffectiveDate,\n )\n\n if (!primaryCompensation) {\n return 0\n }\n\n const salaried = isSalaried(primaryCompensation)\n const hoursInPayPeriod = paySchedule ? getHoursInPayPeriod(paySchedule) : 0\n\n const isSalariedWithExpectedHours = isSalariedWithPayPeriodExpectedHours(\n compensation,\n salaried,\n hoursInPayPeriod,\n )\n\n const ptoHours = getPtoHours(\n compensation,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n isOffCycle,\n )\n\n const regularPlusOvertimePay = calculateRegularPlusOvertimePay(\n compensation,\n employee,\n compensationEffectiveDate,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n ptoHours,\n isOffCycle,\n )\n\n const fixedPay = getAdditionalEarnings(compensation)\n const ptoPay = calculatePtoPay(\n compensation,\n employee,\n compensationEffectiveDate,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n isOffCycle,\n )\n const minimumWageAdjustment = calculateMinimumWageAdjustment(\n primaryCompensation,\n compensation,\n compensationEffectiveDate,\n )\n\n const total = regularPlusOvertimePay + fixedPay + ptoPay + minimumWageAdjustment\n return roundToTwoDecimals(total)\n}\n"],"names":["REGULAR_HOURS_NAME","getPrimaryJob","employee","job","roundToSixDecimals","value","roundToTwoDecimals","isRegularHours","compensationName","PAY_PERIOD_HOURS_MAPPINGS","formatEmployeePayRate","t","locale","primaryJob","jobCompensation","rate","paymentUnit","formatPayRate","useFormatEmployeePayRate","useTranslation","useLocale","useCallback","getRegularHours","compensation","hourlyCompensation","sum","getTotalPtoHours","pto","getAdditionalEarnings","fixedCompensation","name","amount","getReimbursements","reimbursementComp","formatHoursDisplay","hours","rounded","getHoursInPayPeriod","paySchedule","getEffectiveCompensation","compensations","effectiveDate","sorted","a","b","i","currentDateString","currentDate","getEffectiveMinimumWage","minimumWages","isSalaried","getTotalTipCompensations","fixedCompensations","calculateHourlyRate","getHourlyRateForJob","jobUuid","j","getPrimaryHourlyRate","getTotalOutstandingPtoHours","paidTimeOff","getPtoHours","isSalariedWithExpectedHours","hoursInPayPeriod","offCycle","regularPtoHours","outstandingPtoHours","calculateMinimumWageAdjustment","primaryCompensation","effectiveMinWage","totalHours","hourlyRate","totalTipCredit","totalTips","calculateRegularPlusOvertimePay","ptoHours","isOffCycle","regularRatePay","hc","overtimeWeightedRate","overtimePay","multiplier","calculatePtoPay","primaryHourlyRate","isSalariedWithPayPeriodExpectedHours","regularHourlyCompensation","calculateGrossPay","compensationEffectiveDateString","compensationEffectiveDate","salaried","regularPlusOvertimePay","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Ic,IAAyBhB;AAAA,IAC7BlD;AAAA,IACArB;AAAA,IACAqF;AAAA,IACA1B;AAAA,IACAC;AAAA,IACAY;AAAA,IACAC;AAAA,EAAA,GAGIe,IAAW9D,EAAsBL,CAAY,GAC7CoE,IAASV;AAAA,IACb1D;AAAA,IACArB;AAAA,IACAqF;AAAA,IACA1B;AAAA,IACAC;AAAA,IACAa;AAAA,EAAA,GAEIiB,IAAwB1B;AAAA,IAC5BC;AAAA,IACA5C;AAAA,IACAgE;AAAA,EAAA,GAGIM,IAAQJ,IAAyBC,IAAWC,IAASC;AAC3D,SAAOtF,EAAmBuF,CAAK;AACjC;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../src/components/Payroll/helpers.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { PayrollShowFixedCompensations } from '@gusto/embedded-api/models/components/payrollshow'\nimport type { FixedCompensations } from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport type { PayrollFixedCompensationTypesType } from '@gusto/embedded-api/models/components/payrollfixedcompensationtypestype'\nimport { useCallback } from 'react'\nimport type { TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { Compensation, MinimumWages } from '@gusto/embedded-api/models/components/compensation'\nimport type { PayrollEmployeeCompensationsType } from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport type { PayrollType } from './PayrollList/types'\nimport type { PayrollHistoryStatus } from './PayrollHistory/PayrollHistory'\nimport { formatPayRate } from '@/helpers/formattedStrings'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { COMPENSATION_NAME_REIMBURSEMENT, FlsaStatus } from '@/shared/constants'\n\nconst REGULAR_HOURS_NAME = 'regular hours'\n\n// Utility to get the primary job from an employee\nexport const getPrimaryJob = (employee: Employee) => {\n return employee.jobs?.find(job => job.primary) || employee.jobs?.[0] || null\n}\n\nconst roundToSixDecimals = (value: number): number => {\n return Math.round(value * 1_000_000) / 1_000_000\n}\n\nconst roundToTwoDecimals = (value: number): number => {\n return Math.round(value * 100) / 100\n}\n\nconst isRegularHours = (compensationName: string): boolean => {\n return compensationName.toLowerCase() === REGULAR_HOURS_NAME\n}\n\nconst PAY_PERIOD_HOURS_MAPPINGS: Record<string, number> = {\n Daily: 8.0,\n 'Every week': 40.0,\n 'Every other week': 80.0,\n 'Twice per month': 86.666667,\n Monthly: 173.333333,\n Quarterly: 520.0,\n Semiannually: 1040.0,\n Annually: 2080.0,\n}\n\nexport const formatEmployeePayRate = ({\n employee,\n t,\n locale = 'en-US',\n}: {\n employee?: Employee\n t: TFunction\n locale?: string\n}) => {\n if (!employee?.jobs) {\n return null\n }\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return null\n }\n\n const jobCompensation = primaryJob.compensations[0]\n if (!jobCompensation) {\n return null\n }\n if (!jobCompensation.rate || parseFloat(jobCompensation.rate) === 0) {\n return null\n }\n\n const rate = parseFloat(jobCompensation.rate)\n const paymentUnit = jobCompensation.paymentUnit || 'Hour'\n\n return formatPayRate({ rate, paymentUnit, t, locale })\n}\n\nexport const useFormatEmployeePayRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (employee?: Employee) => {\n return formatEmployeePayRate({ employee, t, locale })\n },\n [t, locale],\n )\n}\n\nexport const getEmployeePayRateInfo = (employee: Employee | undefined) => {\n if (!employee?.jobs) {\n return null\n }\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return null\n }\n\n const jobCompensation = primaryJob.compensations[0]\n if (!jobCompensation) {\n return null\n }\n if (!jobCompensation.rate || parseFloat(jobCompensation.rate) === 0) {\n return null\n }\n\n const rate = parseFloat(jobCompensation.rate)\n const paymentUnit = jobCompensation.paymentUnit || 'Hour'\n\n return { rate, paymentUnit }\n}\n\nexport const getRegularHours = (compensation: PayrollEmployeeCompensationsType) => {\n if (!compensation.hourlyCompensations) return 0\n\n return compensation.hourlyCompensations\n .filter(hourlyCompensation => hourlyCompensation.name?.toLowerCase() === 'regular hours')\n .reduce((sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'), 0)\n}\n\nexport function getOvertimeHours(compensation: PayrollEmployeeCompensationsType) {\n if (!compensation.hourlyCompensations || compensation.excluded) {\n return 0\n }\n\n return compensation.hourlyCompensations\n .filter(hourlyCompensation => Number(hourlyCompensation.compensationMultiplier) > 1)\n .reduce((sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'), 0)\n}\n\nexport const getTotalPtoHours = (compensation: PayrollEmployeeCompensationsType) => {\n if (!compensation.paidTimeOff) {\n return 0\n }\n return compensation.paidTimeOff.reduce((sum, pto) => sum + parseFloat(pto.hours || '0'), 0)\n}\n\nexport const getAdditionalEarnings = (compensation: PayrollEmployeeCompensationsType) => {\n if (!compensation.fixedCompensations) {\n return 0\n }\n\n return compensation.fixedCompensations\n .filter(fixedCompensation => {\n const name = fixedCompensation.name?.toLowerCase() || ''\n const amount = parseFloat(fixedCompensation.amount || '0')\n return name !== 'reimbursement' && name !== 'minimum wage adjustment' && amount > 0\n })\n .reduce((sum, fixedCompensation) => sum + parseFloat(fixedCompensation.amount || '0'), 0)\n}\n\nexport const getReimbursements = (compensation: PayrollEmployeeCompensationsType) => {\n if (!compensation.fixedCompensations) {\n return 0\n }\n\n const reimbursementComp = compensation.fixedCompensations.find(\n fixedCompensation => fixedCompensation.name?.toLowerCase() === 'reimbursement',\n )\n return reimbursementComp ? parseFloat(reimbursementComp.amount || '0') : 0\n}\n\nexport const formatHoursDisplay = (hours: number): string => {\n const rounded = roundToTwoDecimals(hours)\n\n if (rounded % 1 === 0) {\n return `${rounded}.0`\n }\n\n return rounded.toString()\n}\n\nconst getHoursInPayPeriod = (paySchedule: PayScheduleObject): number => {\n if (!paySchedule.frequency) {\n return 0\n }\n\n return PAY_PERIOD_HOURS_MAPPINGS[paySchedule.frequency] || 0\n}\n\nconst getEffectiveCompensation = (\n compensations: Compensation[],\n effectiveDate: Date,\n): Compensation | null => {\n if (!compensations.length) return null\n\n const sorted = [...compensations].sort(\n (a, b) =>\n (a.effectiveDate ? new Date(a.effectiveDate).getTime() : 0) -\n (b.effectiveDate ? new Date(b.effectiveDate).getTime() : 0),\n )\n\n for (let i = sorted.length - 1; i >= 0; i--) {\n const currentDateString = sorted[i]?.effectiveDate\n const currentDate = currentDateString ? new Date(currentDateString) : null\n if (currentDate && currentDate <= effectiveDate) {\n return sorted[i] || null\n }\n }\n\n return sorted[0] || null\n}\n\nconst getEffectiveMinimumWage = (\n minimumWages: MinimumWages[],\n effectiveDate: Date,\n): MinimumWages | null => {\n if (!minimumWages.length) return null\n\n const sorted = [...minimumWages].sort(\n (a, b) =>\n (a.effectiveDate ? new Date(a.effectiveDate).getTime() : 0) -\n (b.effectiveDate ? new Date(b.effectiveDate).getTime() : 0),\n )\n\n for (let i = sorted.length - 1; i >= 0; i--) {\n const currentDateString = sorted[i]?.effectiveDate\n const currentDate = currentDateString ? new Date(currentDateString) : null\n if (currentDate && currentDate <= effectiveDate) {\n return sorted[i] || null\n }\n }\n\n return sorted[0] || null\n}\n\nconst isSalaried = (compensation: Compensation): boolean => {\n return compensation.flsaStatus === 'Exempt' || compensation.flsaStatus === 'Salaried Nonexempt'\n}\n\nconst getTotalTipCompensations = (fixedCompensations: PayrollShowFixedCompensations[]): number => {\n if (!fixedCompensations.length) return 0\n\n return fixedCompensations\n .filter(fixedCompensation => {\n const name = fixedCompensation.name?.toLowerCase()\n const amount = parseFloat(fixedCompensation.amount || '0')\n return (name === 'paycheck tips' || name === 'cash tips') && amount > 0\n })\n .reduce((sum, fixedCompensation) => sum + parseFloat(fixedCompensation.amount || '0'), 0)\n}\n\nconst calculateHourlyRate = (compensation: Compensation): number => {\n const rate = parseFloat(compensation.rate || '0')\n const paymentUnit = compensation.paymentUnit || 'Hour'\n\n switch (paymentUnit) {\n case 'Hour':\n return rate\n case 'Year':\n return rate / 2080 // 52 weeks * 40 hours\n case 'Month':\n return rate / 173.333333\n case 'Week':\n return rate / 40\n case 'Paycheck':\n return 0 // Paycheck rate is 0 for hourly calculation\n default:\n return rate\n }\n}\n\nconst getHourlyRateForJob = (employee: Employee, jobUuid: string, effectiveDate: Date): number => {\n const job = employee.jobs?.find(j => j.uuid === jobUuid)\n if (!job?.compensations) {\n return 0\n }\n\n const compensation = getEffectiveCompensation(job.compensations, effectiveDate)\n return compensation ? calculateHourlyRate(compensation) : 0\n}\n\nconst getPrimaryHourlyRate = (employee: Employee, effectiveDate: Date): number => {\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return 0\n }\n\n const compensation = getEffectiveCompensation(primaryJob.compensations, effectiveDate)\n return compensation ? calculateHourlyRate(compensation) : 0\n}\n\nconst getTotalOutstandingPtoHours = (compensation: PayrollEmployeeCompensationsType): number => {\n if (!compensation.paidTimeOff) {\n return 0\n }\n\n return compensation.paidTimeOff.reduce(\n (sum, paidTimeOff) => sum + parseFloat(paidTimeOff.finalPayoutUnusedHoursInput || '0'),\n 0,\n )\n}\n\nconst getPtoHours = (\n compensation: PayrollEmployeeCompensationsType,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n offCycle: boolean,\n): number => {\n const regularPtoHours = getTotalPtoHours(compensation)\n\n if (offCycle) {\n const outstandingPtoHours = getTotalOutstandingPtoHours(compensation)\n return regularPtoHours + outstandingPtoHours\n }\n\n if (isSalariedWithExpectedHours) {\n return Math.min(hoursInPayPeriod, regularPtoHours)\n }\n\n return regularPtoHours\n}\n\nconst calculateMinimumWageAdjustment = (\n primaryCompensation: Compensation,\n compensation: PayrollEmployeeCompensationsType,\n effectiveDate: Date,\n): number => {\n if (!primaryCompensation.adjustForMinimumWage) return 0\n\n const effectiveMinWage = getEffectiveMinimumWage(\n primaryCompensation.minimumWages || [],\n effectiveDate,\n )\n if (!effectiveMinWage) {\n return 0\n }\n\n const totalHours =\n compensation.hourlyCompensations?.reduce(\n (sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'),\n 0,\n ) || 0\n\n const hourlyRate = calculateHourlyRate(primaryCompensation)\n\n const totalTipCredit = (parseFloat(effectiveMinWage.wage || '0') - hourlyRate) * totalHours\n const totalTips = getTotalTipCompensations(compensation.fixedCompensations || [])\n\n return Math.max(0, totalTipCredit - totalTips)\n}\n\nconst calculateRegularPlusOvertimePay = (\n compensation: PayrollEmployeeCompensationsType,\n employee: Employee,\n effectiveDate: Date,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n ptoHours: number,\n isOffCycle: boolean,\n): number => {\n if (!isOffCycle && isSalariedWithExpectedHours) {\n const primaryHourlyRate = getPrimaryHourlyRate(employee, effectiveDate)\n return primaryHourlyRate * (hoursInPayPeriod - ptoHours)\n }\n\n if (!compensation.hourlyCompensations || !employee.jobs) {\n return 0\n }\n\n const regularRatePay = compensation.hourlyCompensations.reduce((sum, hc) => {\n const hours = parseFloat(hc.hours || '0')\n const hourlyRate = getHourlyRateForJob(employee, hc.jobUuid || '', effectiveDate)\n return sum + hours * hourlyRate\n }, 0)\n\n const totalHours = compensation.hourlyCompensations.reduce((sum, hc) => {\n return sum + parseFloat(hc.hours || '0')\n }, 0)\n\n if (totalHours === 0) return regularRatePay\n\n const overtimeWeightedRate = roundToSixDecimals(regularRatePay / totalHours)\n\n // Calculate overtime pay for non-regular hours\n const overtimePay = compensation.hourlyCompensations\n .filter(hc => !isRegularHours(hc.name || ''))\n .reduce((sum, hc) => {\n const hours = parseFloat(hc.hours || '0')\n const multiplier = hc.compensationMultiplier || 1\n return sum + hours * overtimeWeightedRate * (multiplier - 1)\n }, 0)\n\n return regularRatePay + overtimePay\n}\n\nconst calculatePtoPay = (\n compensation: PayrollEmployeeCompensationsType,\n employee: Employee,\n effectiveDate: Date,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n offCycle: boolean,\n): number => {\n const ptoHours = getPtoHours(\n compensation,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n offCycle,\n )\n const primaryHourlyRate = getPrimaryHourlyRate(employee, effectiveDate)\n return ptoHours * primaryHourlyRate\n}\n\nconst isSalariedWithPayPeriodExpectedHours = (\n compensation: PayrollEmployeeCompensationsType,\n isSalaried: boolean,\n hoursInPayPeriod: number,\n): boolean => {\n if (!isSalaried) return false\n\n const regularHourlyCompensation = compensation.hourlyCompensations?.find(hourlyCompensation =>\n isRegularHours(hourlyCompensation.name || ''),\n )\n\n if (!regularHourlyCompensation) return false\n\n const regularHours = parseFloat(regularHourlyCompensation.hours || '0')\n return regularHours === hoursInPayPeriod\n}\n\nexport const calculateGrossPay = (\n compensation: PayrollEmployeeCompensationsType,\n employee: Employee,\n compensationEffectiveDateString?: string,\n paySchedule?: PayScheduleObject,\n isOffCycle: boolean = false,\n): number => {\n if (compensation.excluded) {\n return 0\n }\n\n const compensationEffectiveDate = compensationEffectiveDateString\n ? new Date(compensationEffectiveDateString)\n : new Date()\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return 0\n }\n\n const primaryCompensation = getEffectiveCompensation(\n primaryJob.compensations,\n compensationEffectiveDate,\n )\n\n if (!primaryCompensation) {\n return 0\n }\n\n const salaried = isSalaried(primaryCompensation)\n const hoursInPayPeriod = paySchedule ? getHoursInPayPeriod(paySchedule) : 0\n\n const isSalariedWithExpectedHours = isSalariedWithPayPeriodExpectedHours(\n compensation,\n salaried,\n hoursInPayPeriod,\n )\n\n const ptoHours = getPtoHours(\n compensation,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n isOffCycle,\n )\n\n const regularPlusOvertimePay = calculateRegularPlusOvertimePay(\n compensation,\n employee,\n compensationEffectiveDate,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n ptoHours,\n isOffCycle,\n )\n\n const fixedPay = getAdditionalEarnings(compensation)\n const ptoPay = calculatePtoPay(\n compensation,\n employee,\n compensationEffectiveDate,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n isOffCycle,\n )\n const minimumWageAdjustment = calculateMinimumWageAdjustment(\n primaryCompensation,\n compensation,\n compensationEffectiveDate,\n )\n\n const total = regularPlusOvertimePay + fixedPay + ptoPay + minimumWageAdjustment\n return roundToTwoDecimals(total)\n}\n\n// Payroll type and status utilities\nexport const getPayrollType = (payroll: {\n external?: boolean\n offCycle?: boolean\n}): PayrollType => {\n if (payroll.external) return 'External'\n if (payroll.offCycle) return 'Off-Cycle'\n return 'Regular'\n}\n\nexport const getPayrollStatus = (payroll: {\n processed?: boolean\n checkDate?: string | null\n}): PayrollHistoryStatus => {\n if (!payroll.processed) {\n return 'Unprocessed'\n }\n\n // For processed payrolls, determine more specific status\n const now = new Date()\n const checkDate = payroll.checkDate ? new Date(payroll.checkDate) : null\n const isCheckDatePassed = checkDate && checkDate <= now\n\n // If check date has passed, consider it paid/complete\n if (isCheckDatePassed) {\n return 'Paid'\n }\n\n // If processed but check date hasn't arrived yet, it's pending\n return 'Pending'\n}\n\nexport const getAdditionalEarningsCompensations = ({\n flsaStatus,\n existingFixedCompensations = [],\n primaryJobUuid,\n fixedCompensationTypes = [],\n excludedTypes = [],\n}: {\n flsaStatus: string | undefined\n existingFixedCompensations?: FixedCompensations[]\n primaryJobUuid?: string\n fixedCompensationTypes?: PayrollFixedCompensationTypesType[]\n excludedTypes?: string[]\n}): FixedCompensations[] => {\n const allFixedCompensations = [...existingFixedCompensations]\n\n if (flsaStatus !== FlsaStatus.OWNER && primaryJobUuid && fixedCompensationTypes.length > 0) {\n const compensationTypeNames = fixedCompensationTypes\n .map(type => type.name)\n .filter(Boolean) as string[]\n\n compensationTypeNames.forEach(compensationName => {\n const exists = allFixedCompensations.some(\n comp => comp.name?.toLowerCase() === compensationName.toLowerCase(),\n )\n\n if (!exists) {\n allFixedCompensations.push({\n name: compensationName,\n amount: '0.00',\n jobUuid: primaryJobUuid,\n })\n }\n })\n }\n\n // Filter and sort additional earnings (exclude specified types)\n return allFixedCompensations\n .filter(comp => comp.name && !excludedTypes.includes(comp.name))\n .sort((a, b) => (a.name || '').localeCompare(b.name || ''))\n}\n\nexport const getReimbursementCompensation = (\n fixedCompensations: FixedCompensations[],\n fixedCompensationTypes: PayrollFixedCompensationTypesType[],\n primaryJobUuid?: string,\n) => {\n const reimbursementCompensation = fixedCompensations.find(\n comp => comp.name?.toLowerCase() === COMPENSATION_NAME_REIMBURSEMENT.toLowerCase(),\n )\n\n if (reimbursementCompensation) {\n return reimbursementCompensation\n }\n\n if (\n primaryJobUuid &&\n fixedCompensationTypes.some(\n type => type.name?.toLowerCase() === COMPENSATION_NAME_REIMBURSEMENT.toLowerCase(),\n )\n ) {\n return {\n name: COMPENSATION_NAME_REIMBURSEMENT,\n amount: '0.00',\n jobUuid: primaryJobUuid,\n }\n }\n\n return null\n}\n"],"names":["REGULAR_HOURS_NAME","getPrimaryJob","employee","job","roundToSixDecimals","value","roundToTwoDecimals","isRegularHours","compensationName","PAY_PERIOD_HOURS_MAPPINGS","formatEmployeePayRate","locale","primaryJob","jobCompensation","rate","paymentUnit","formatPayRate","useFormatEmployeePayRate","t","useTranslation","useLocale","useCallback","getRegularHours","compensation","hourlyCompensation","sum","getOvertimeHours","getTotalPtoHours","pto","getAdditionalEarnings","fixedCompensation","name","amount","getReimbursements","reimbursementComp","formatHoursDisplay","hours","rounded","getHoursInPayPeriod","paySchedule","getEffectiveCompensation","compensations","effectiveDate","sorted","a","b","i","currentDateString","currentDate","getEffectiveMinimumWage","minimumWages","isSalaried","getTotalTipCompensations","fixedCompensations","calculateHourlyRate","getHourlyRateForJob","jobUuid","j","getPrimaryHourlyRate","getTotalOutstandingPtoHours","paidTimeOff","getPtoHours","isSalariedWithExpectedHours","hoursInPayPeriod","offCycle","regularPtoHours","outstandingPtoHours","calculateMinimumWageAdjustment","primaryCompensation","effectiveMinWage","totalHours","hourlyRate","totalTipCredit","totalTips","calculateRegularPlusOvertimePay","ptoHours","isOffCycle","regularRatePay","hc","overtimeWeightedRate","overtimePay","multiplier","calculatePtoPay","primaryHourlyRate","isSalariedWithPayPeriodExpectedHours","regularHourlyCompensation","calculateGrossPay","compensationEffectiveDateString","compensationEffectiveDate","salaried","regularPlusOvertimePay","fixedPay","ptoPay","minimumWageAdjustment","total","getPayrollType","payroll","getPayrollStatus","now","checkDate","getAdditionalEarningsCompensations","flsaStatus","existingFixedCompensations","primaryJobUuid","fixedCompensationTypes","excludedTypes","allFixedCompensations","FlsaStatus","type","comp","getReimbursementCompensation","reimbursementCompensation","COMPENSATION_NAME_REIMBURSEMENT"],"mappings":";;;;;AAgBA,MAAMA,IAAqB,iBAGdC,IAAgB,CAACC,MACrBA,EAAS,MAAM,KAAK,CAAAC,MAAOA,EAAI,OAAO,KAAKD,EAAS,OAAO,CAAC,KAAK,MAGpEE,IAAqB,CAACC,MACnB,KAAK,MAAMA,IAAQ,GAAS,IAAI,KAGnCC,IAAqB,CAACD,MACnB,KAAK,MAAMA,IAAQ,GAAG,IAAI,KAG7BE,IAAiB,CAACC,MACfA,EAAiB,kBAAkBR,GAGtCS,IAAoD;AAAA,EACxD,OAAO;AAAA,EACP,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,cAAc;AAAA,EACd,UAAU;AACZ,GAEaC,IAAwB,CAAC;AAAA,EACpC,UAAAR;AAAA,EACA;AAAA,EACA,QAAAS,IAAS;AACX,MAIM;AACJ,MAAI,CAACT,GAAU;AACb,WAAO;AAGT,QAAMU,IAAaX,EAAcC,CAAQ;AACzC,MAAI,CAACU,GAAY;AACf,WAAO;AAGT,QAAMC,IAAkBD,EAAW,cAAc,CAAC;AAIlD,MAHI,CAACC,KAGD,CAACA,EAAgB,QAAQ,WAAWA,EAAgB,IAAI,MAAM;AAChE,WAAO;AAGT,QAAMC,IAAO,WAAWD,EAAgB,IAAI,GACtCE,IAAcF,EAAgB,eAAe;AAEnD,SAAOG,EAAc,EAAE,MAAAF,GAAM,aAAAC,G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A,EACjD,YAAAC;AAAA,EACA,4BAAAC,IAA6B,CAAA;AAAA,EAC7B,gBAAAC;AAAA,EACA,wBAAAC,IAAyB,CAAA;AAAA,EACzB,eAAAC,IAAgB,CAAA;AAClB,MAM4B;AAC1B,QAAMC,IAAwB,CAAC,GAAGJ,CAA0B;AAE5D,SAAID,MAAeM,EAAW,SAASJ,KAAkBC,EAAuB,SAAS,KACzDA,EAC3B,IAAI,CAAAI,MAAQA,EAAK,IAAI,EACrB,OAAO,OAAO,EAEK,QAAQ,CAAApG,MAAoB;AAKhD,IAJekG,EAAsB;AAAA,MACnC,OAAQG,EAAK,MAAM,YAAA,MAAkBrG,EAAiB,YAAA;AAAA,IAAY,KAIlEkG,EAAsB,KAAK;AAAA,MACzB,MAAMlG;AAAA,MACN,QAAQ;AAAA,MACR,SAAS+F;AAAA,IAAA,CACV;AAAA,EAEL,CAAC,GAIIG,EACJ,OAAO,CAAAG,MAAQA,EAAK,QAAQ,CAACJ,EAAc,SAASI,EAAK,IAAI,CAAC,EAC9D,KAAK,CAACjE,GAAGC,OAAOD,EAAE,QAAQ,IAAI,cAAcC,EAAE,QAAQ,EAAE,CAAC;AAC9D,GAEaiE,KAA+B,CAC1CzD,GACAmD,GACAD,MACG;AACH,QAAMQ,IAA4B1D,EAAmB;AAAA,IACnD,OAAQwD,EAAK,MAAM,YAAA,MAAkBG,EAAgC,YAAA;AAAA,EAAY;AAGnF,SAAID,MAKFR,KACAC,EAAuB;AAAA,IACrB,OAAQI,EAAK,MAAM,YAAA,MAAkBI,EAAgC,YAAA;AAAA,EAAY,IAG5E;AAAA,IACL,MAAMA;AAAA,IACN,QAAQ;AAAA,IACR,SAAST;AAAA,EAAA,IAIN;AACT;"}
@@ -1,6 +1,8 @@
1
1
  import "./types/i18next.d.ts"
2
2
  export { PayrollConfiguration } from './PayrollConfiguration/PayrollConfiguration';
3
3
  export { PayrollEditEmployee } from './PayrollEditEmployee/PayrollEditEmployee';
4
+ export { PayrollHistory } from './PayrollHistory/PayrollHistory';
5
+ export { PayrollLanding } from './PayrollLanding/PayrollLanding';
4
6
  export { PayrollList } from './PayrollList/PayrollList';
5
7
  export { PayrollOverview } from './PayrollOverview/PayrollOverview';
6
8
  export { RunPayrollFlow } from './RunPayrollFlow/RunPayrollFlow';
@@ -1,13 +1,17 @@
1
1
  import { PayrollConfiguration as l } from "./PayrollConfiguration/PayrollConfiguration.js";
2
2
  import { PayrollEditEmployee as t } from "./PayrollEditEmployee/PayrollEditEmployee.js";
3
- import { PayrollList as f } from "./PayrollList/PayrollList.js";
4
- import { PayrollOverview as p } from "./PayrollOverview/PayrollOverview.js";
5
- import { RunPayrollFlow as i } from "./RunPayrollFlow/RunPayrollFlow.js";
3
+ import { PayrollHistory as y } from "./PayrollHistory/PayrollHistory.js";
4
+ import { PayrollLanding as m } from "./PayrollLanding/PayrollLanding.js";
5
+ import { PayrollList as i } from "./PayrollList/PayrollList.js";
6
+ import { PayrollOverview as P } from "./PayrollOverview/PayrollOverview.js";
7
+ import { RunPayrollFlow as d } from "./RunPayrollFlow/RunPayrollFlow.js";
6
8
  export {
7
9
  l as PayrollConfiguration,
8
10
  t as PayrollEditEmployee,
9
- f as PayrollList,
10
- p as PayrollOverview,
11
- i as RunPayrollFlow
11
+ y as PayrollHistory,
12
+ m as PayrollLanding,
13
+ i as PayrollList,
14
+ P as PayrollOverview,
15
+ d as RunPayrollFlow
12
16
  };
13
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { TextInput as t } from "../../../components/Common/UI/TextInput/TextInput.js";
3
- import { NumberInput as m } from "../../../components/Common/UI/NumberInput/NumberInput.js";
2
+ import { TextInput as m } from "../../../components/Common/UI/TextInput/TextInput.js";
3
+ import { NumberInput as t } from "../../../components/Common/UI/NumberInput/NumberInput.js";
4
4
  import { CheckboxGroup as e } from "../../../components/Common/UI/CheckboxGroup/CheckboxGroup.js";
5
5
  import { ComboBox as i } from "../../../components/Common/UI/ComboBox/ComboBox.js";
6
6
  import { Checkbox as p } from "../../../components/Common/UI/Checkbox/Checkbox.js";
@@ -13,45 +13,47 @@ import { Button as c } from "../../../components/Common/UI/Button/Button.js";
13
13
  import { ButtonIcon as s } from "../../../components/Common/UI/Button/ButtonIcon.js";
14
14
  import { Alert as b } from "../../../components/Common/UI/Alert/Alert.js";
15
15
  import { Card as x } from "../../../components/Common/UI/Card/Card.js";
16
- import { Badge as C } from "../../../components/Common/UI/Badge/Badge.js";
17
- import { Link as B } from "../../../components/Common/UI/Link/Link.js";
18
- import { Menu as l } from "../../../components/Common/UI/Menu/Menu.js";
19
- import { Table as k } from "../../../components/Common/UI/Table/Table.js";
20
- import { OrderedList as T } from "../../../components/Common/UI/List/OrderedList.js";
21
- import { UnorderedList as g } from "../../../components/Common/UI/List/UnorderedList.js";
16
+ import { Badge as l } from "../../../components/Common/UI/Badge/Badge.js";
17
+ import { Link as C } from "../../../components/Common/UI/Link/Link.js";
18
+ import { Menu as B } from "../../../components/Common/UI/Menu/Menu.js";
19
+ import { Table as g } from "../../../components/Common/UI/Table/Table.js";
20
+ import { OrderedList as k } from "../../../components/Common/UI/List/OrderedList.js";
21
+ import { UnorderedList as T } from "../../../components/Common/UI/List/UnorderedList.js";
22
22
  import { Heading as h } from "../../../components/Common/UI/Heading/Heading.js";
23
23
  import { Text as I } from "../../../components/Common/UI/Text/Text.js";
24
24
  import { CalendarPreview as L } from "../../../components/Common/UI/CalendarPreview/CalendarPreview.js";
25
25
  import { ProgressBar as P } from "../../../components/Common/UI/ProgressBar/ProgressBar.js";
26
26
  import { Tabs as w } from "../../../components/Common/UI/Tabs/Tabs.js";
27
- const $ = {
27
+ import { Dialog as D } from "../../../components/Common/UI/Dialog/Dialog.js";
28
+ const ro = {
28
29
  Alert: (o) => /* @__PURE__ */ r(b, { ...o }),
29
- Badge: (o) => /* @__PURE__ */ r(C, { ...o }),
30
+ Badge: (o) => /* @__PURE__ */ r(l, { ...o }),
30
31
  Button: (o) => /* @__PURE__ */ r(c, { ...o }),
31
32
  ButtonIcon: (o) => /* @__PURE__ */ r(s, { ...o }),
32
33
  Card: (o) => /* @__PURE__ */ r(x, { ...o }),
33
- TextInput: (o) => /* @__PURE__ */ r(t, { ...o }),
34
+ TextInput: (o) => /* @__PURE__ */ r(m, { ...o }),
34
35
  Checkbox: (o) => /* @__PURE__ */ r(p, { ...o }),
35
36
  CheckboxGroup: (o) => /* @__PURE__ */ r(e, { ...o }),
36
37
  ComboBox: (o) => /* @__PURE__ */ r(i, { ...o }),
37
38
  DatePicker: (o) => /* @__PURE__ */ r(f, { ...o }),
38
- OrderedList: (o) => /* @__PURE__ */ r(T, { ...o }),
39
- UnorderedList: (o) => /* @__PURE__ */ r(g, { ...o }),
40
- NumberInput: (o) => /* @__PURE__ */ r(m, { ...o }),
39
+ OrderedList: (o) => /* @__PURE__ */ r(k, { ...o }),
40
+ UnorderedList: (o) => /* @__PURE__ */ r(T, { ...o }),
41
+ NumberInput: (o) => /* @__PURE__ */ r(t, { ...o }),
41
42
  Radio: (o) => /* @__PURE__ */ r(a, { ...o }),
42
43
  RadioGroup: (o) => /* @__PURE__ */ r(n, { ...o }),
43
44
  Select: (o) => /* @__PURE__ */ r(d, { ...o }),
44
45
  Switch: (o) => /* @__PURE__ */ r(u, { ...o }),
45
- Link: (o) => /* @__PURE__ */ r(B, { ...o }),
46
- Menu: (o) => /* @__PURE__ */ r(l, { ...o }),
47
- Table: (o) => /* @__PURE__ */ r(k, { ...o }),
46
+ Link: (o) => /* @__PURE__ */ r(C, { ...o }),
47
+ Menu: (o) => /* @__PURE__ */ r(B, { ...o }),
48
+ Table: (o) => /* @__PURE__ */ r(g, { ...o }),
48
49
  Heading: (o) => /* @__PURE__ */ r(h, { ...o }),
49
50
  Text: (o) => /* @__PURE__ */ r(I, { ...o }),
50
51
  CalendarPreview: (o) => /* @__PURE__ */ r(L, { ...o }),
51
52
  ProgressBar: (o) => /* @__PURE__ */ r(P, { ...o }),
52
- Tabs: (o) => /* @__PURE__ */ r(w, { ...o })
53
+ Tabs: (o) => /* @__PURE__ */ r(w, { ...o }),
54
+ Dialog: (o) => /* @__PURE__ */ r(D, { ...o })
53
55
  };
54
56
  export {
55
- $ as defaultComponents
57
+ ro as defaultComponents
56
58
  };
57
59
  //# sourceMappingURL=defaultComponentAdapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport { Tabs } from '@/components/Common/UI/Tabs'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Tabs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqDO,MAAMA,IAA2C;AAAA,EACtD,OAAO,CAACC,MAAsB,gBAAAC,EAACC,GAAA,EAAO,GAAGF,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GAAO;AAAA,EAC7C,MAAM,CAACA,MAAqB,gBAAAC,EAACmB,GAAA,EAAM,GAAGpB,GAAO;AAAA,EAC7C,OAAO,CAACA,MAAsB,gBAAAC,EAACoB,GAAA,EAAO,GAAGrB,GAAO;AAAA,EAChD,SAAS,CAACA,MAAwB,gBAAAC,EAACqB,GAAA,EAAS,GAAGtB,GAAO;AAAA,EACtD,MAAM,CAACA,MAAqB,gBAAAC,EAACsB,GAAA,EAAM,GAAGvB,GAAO;AAAA,EAC7C,iBAAiB,CAACA,MAAgC,gBAAAC,EAACuB,GAAA,EAAiB,GAAGxB,GAAO;AAAA,EAC9E,aAAa,CAACA,MAA4B,gBAAAC,EAACwB,GAAA,EAAa,GAAGzB,GAAO;AAAA,EAClE,MAAM,CAACA,MAAqB,gBAAAC,EAACyB,GAAA,EAAM,GAAG1B,EAAA,CAAO;AAC/C;"}
1
+ {"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport { Tabs } from '@/components/Common/UI/Tabs'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { Dialog } from '@/components/Common/UI/Dialog'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n Dialog: (props: DialogProps) => <Dialog {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Tabs","Dialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDO,MAAMA,KAA2C;AAAA,EACtD,OAAO,CAACC,MAAsB,gBAAAC,EAACC,GAAA,EAAO,GAAGF,GAAO;AAAA,EAChD,OAAO,CAACA,MAAsB,gBAAAC,EAACE,GAAA,EAAO,GAAGH,GAAO;AAAA,EAChD,QAAQ,CAACA,MAAuB,gBAAAC,EAACG,GAAA,EAAQ,GAAGJ,GAAO;AAAA,EACnD,YAAY,CAACA,MAA2B,gBAAAC,EAACI,GAAA,EAAY,GAAGL,GAAO;AAAA,EAC/D,MAAM,CAACA,MAAqB,gBAAAC,EAACK,GAAA,EAAM,GAAGN,GAAO;AAAA,EAC7C,WAAW,CAACA,MAA0B,gBAAAC,EAACM,GAAA,EAAW,GAAGP,GAAO;AAAA,EAC5D,UAAU,CAACA,MAAyB,gBAAAC,EAACO,GAAA,EAAU,GAAGR,GAAO;AAAA,EACzD,eAAe,CAACA,MAA8B,gBAAAC,EAACQ,GAAA,EAAe,GAAGT,GAAO;AAAA,EACxE,UAAU,CAACA,MAAyB,gBAAAC,EAACS,GAAA,EAAU,GAAGV,GAAO;AAAA,EACzD,YAAY,CAACA,MAA2B,gBAAAC,EAACU,GAAA,EAAY,GAAGX,GAAO;AAAA,EAC/D,aAAa,CAACA,MAA4B,gBAAAC,EAACW,GAAA,EAAa,GAAGZ,GAAO;AAAA,EAClE,eAAe,CAACA,MAA8B,gBAAAC,EAACY,GAAA,EAAe,GAAGb,GAAO;AAAA,EACxE,aAAa,CAACA,MAA4B,gBAAAC,EAACa,GAAA,EAAa,GAAGd,GAAO;AAAA,EAClE,OAAO,CAACA,MAAsB,gBAAAC,EAACc,GAAA,EAAO,GAAGf,GAAO;AAAA,EAChD,YAAY,CAACA,MAA2B,gBAAAC,EAACe,GAAA,EAAY,GAAGhB,GAAO;AAAA,EAC/D,QAAQ,CAACA,MAAuB,gBAAAC,EAACgB,GAAA,EAAQ,GAAGjB,GAAO;AAAA,EACnD,QAAQ,CAACA,MAAuB,gBAAAC,EAACiB,GAAA,EAAQ,GAAGlB,GAAO;AAAA,EACnD,MAAM,CAACA,MAAqB,gBAAAC,EAACkB,GAAA,EAAM,GAAGnB,GAAO;AAAA,EAC7C,MAAM,CAACA,MAAqB,gBAAAC,EAACmB,GAAA,EAAM,GAAGpB,GAAO;AAAA,EAC7C,OAAO,CAACA,MAAsB,gBAAAC,EAACoB,GAAA,EAAO,GAAGrB,GAAO;AAAA,EAChD,SAAS,CAACA,MAAwB,gBAAAC,EAACqB,GAAA,EAAS,GAAGtB,GAAO;AAAA,EACtD,MAAM,CAACA,MAAqB,gBAAAC,EAACsB,GAAA,EAAM,GAAGvB,GAAO;AAAA,EAC7C,iBAAiB,CAACA,MAAgC,gBAAAC,EAACuB,GAAA,EAAiB,GAAGxB,GAAO;AAAA,EAC9E,aAAa,CAACA,MAA4B,gBAAAC,EAACwB,GAAA,EAAa,GAAGzB,GAAO;AAAA,EAClE,MAAM,CAACA,MAAqB,gBAAAC,EAACyB,GAAA,EAAM,GAAG1B,GAAO;AAAA,EAC7C,QAAQ,CAACA,MAAuB,gBAAAC,EAAC0B,GAAA,EAAQ,GAAG3B,EAAA,CAAO;AACrD;"}
@@ -21,3 +21,4 @@ export type { HeadingProps } from '../../components/Common/UI/Heading/HeadingTyp
21
21
  export type { PaginationControlProps } from '../../components/Common/PaginationControl/PaginationControlTypes';
22
22
  export type { TextProps } from '../../components/Common/UI/Text/TextTypes';
23
23
  export type { CalendarPreviewProps } from '../../components/Common/UI/CalendarPreview/CalendarPreviewTypes';
24
+ export type { DialogProps } from '../../components/Common/UI/Dialog/DialogTypes';
@@ -0,0 +1,78 @@
1
+ import { default as React } from 'react';
2
+ import { ComponentsContextType } from './useComponentContext';
3
+ import { AlertProps } from '../../components/Common/UI/Alert/AlertTypes';
4
+ import { BadgeProps } from '../../components/Common/UI/Badge/BadgeTypes';
5
+ import { ButtonProps, ButtonIconProps } from '../../components/Common/UI/Button/ButtonTypes';
6
+ import { CheckboxProps } from '../../components/Common/UI/Checkbox/CheckboxTypes';
7
+ import { CheckboxGroupProps } from '../../components/Common/UI/CheckboxGroup/CheckboxGroupTypes';
8
+ import { MenuProps } from '../../components/Common/UI/Menu/MenuTypes';
9
+ import { RadioProps } from '../../components/Common/UI/Radio/RadioTypes';
10
+ import { RadioGroupProps } from '../../components/Common/UI/RadioGroup/RadioGroupTypes';
11
+ import { SwitchProps } from '../../components/Common/UI/Switch/SwitchTypes';
12
+ import { TableProps } from '../../components/Common/UI/Table/TableTypes';
13
+ import { TextProps } from '../../components/Common/UI/Text/TextTypes';
14
+ import { TextInputProps } from '../../components/Common/UI/TextInput/TextInputTypes';
15
+ import { DialogProps } from '../../components/Common/UI/Dialog/DialogTypes';
16
+ export declare const componentCreators: {
17
+ readonly Alert: (customComponent: (props: AlertProps) => React.ReactElement | null) => {
18
+ (props: AlertProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
19
+ displayName: string;
20
+ };
21
+ readonly Badge: (customComponent: (props: BadgeProps) => React.ReactElement | null) => {
22
+ (props: BadgeProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
23
+ displayName: string;
24
+ };
25
+ readonly Button: (customComponent: (props: ButtonProps) => React.ReactElement | null) => {
26
+ (props: ButtonProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
27
+ displayName: string;
28
+ };
29
+ readonly ButtonIcon: (customComponent: (props: ButtonIconProps) => React.ReactElement | null) => {
30
+ (props: ButtonIconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
31
+ displayName: string;
32
+ };
33
+ readonly Checkbox: (customComponent: (props: CheckboxProps) => React.ReactElement | null) => {
34
+ (props: CheckboxProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
35
+ displayName: string;
36
+ };
37
+ readonly CheckboxGroup: (customComponent: (props: CheckboxGroupProps) => React.ReactElement | null) => {
38
+ (props: CheckboxGroupProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
39
+ displayName: string;
40
+ };
41
+ readonly Menu: (customComponent: (props: MenuProps) => React.ReactElement | null) => {
42
+ (props: MenuProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
43
+ displayName: string;
44
+ };
45
+ readonly Radio: (customComponent: (props: RadioProps) => React.ReactElement | null) => {
46
+ (props: RadioProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
47
+ displayName: string;
48
+ };
49
+ readonly RadioGroup: (customComponent: (props: RadioGroupProps) => React.ReactElement | null) => {
50
+ (props: RadioGroupProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
51
+ displayName: string;
52
+ };
53
+ readonly Switch: (customComponent: (props: SwitchProps) => React.ReactElement | null) => {
54
+ (props: SwitchProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
55
+ displayName: string;
56
+ };
57
+ readonly Table: (customComponent: (props: TableProps) => React.ReactElement | null) => {
58
+ (props: TableProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
59
+ displayName: string;
60
+ };
61
+ readonly Text: (customComponent: (props: TextProps) => React.ReactElement | null) => {
62
+ (props: TextProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
63
+ displayName: string;
64
+ };
65
+ readonly TextInput: (customComponent: (props: TextInputProps) => React.ReactElement | null) => {
66
+ (props: TextInputProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
67
+ displayName: string;
68
+ };
69
+ readonly Dialog: (customComponent: (props: DialogProps) => React.ReactElement | null) => {
70
+ (props: DialogProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
71
+ displayName: string;
72
+ };
73
+ };
74
+ /**
75
+ * Creates components with automatic default prop handling.
76
+ * Supports both partial (GustoProvider) and full (GustoProviderCustomUIAdapter) component sets.
77
+ */
78
+ export declare function createComponents(providedComponents?: Partial<ComponentsContextType>): ComponentsContextType;
@@ -0,0 +1,57 @@
1
+ import { defaultComponents as f } from "./adapters/defaultComponentAdapter.js";
2
+ import { applyMissingDefaults as i } from "../../helpers/applyMissingDefaults.js";
3
+ import { AlertDefaults as s } from "../../components/Common/UI/Alert/AlertTypes.js";
4
+ import { BadgeDefaults as c } from "../../components/Common/UI/Badge/BadgeTypes.js";
5
+ import { ButtonIconDefaults as l, ButtonDefaults as D } from "../../components/Common/UI/Button/ButtonTypes.js";
6
+ import { CheckboxDefaults as d } from "../../components/Common/UI/Checkbox/CheckboxTypes.js";
7
+ import { CheckboxGroupDefaults as x } from "../../components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js";
8
+ import { MenuDefaults as h } from "../../components/Common/UI/Menu/MenuTypes.js";
9
+ import { RadioDefaults as C } from "../../components/Common/UI/Radio/RadioTypes.js";
10
+ import { RadioGroupDefaults as b } from "../../components/Common/UI/RadioGroup/RadioGroupTypes.js";
11
+ import { SwitchDefaults as B } from "../../components/Common/UI/Switch/SwitchTypes.js";
12
+ import { TableDefaults as T } from "../../components/Common/UI/Table/TableTypes.js";
13
+ import { TextDefaults as g } from "../../components/Common/UI/Text/TextTypes.js";
14
+ import { TextInputDefaults as k } from "../../components/Common/UI/TextInput/TextInputTypes.js";
15
+ import { DialogDefaults as G } from "../../components/Common/UI/Dialog/DialogTypes.js";
16
+ function o(a, t) {
17
+ return (e) => {
18
+ const r = (n) => {
19
+ const u = i(n, a);
20
+ return e(u);
21
+ };
22
+ return r.displayName = `withAutoDefault(${t})`, r;
23
+ };
24
+ }
25
+ const p = {
26
+ Alert: o(s, "Alert"),
27
+ Badge: o(c, "Badge"),
28
+ Button: o(D, "Button"),
29
+ ButtonIcon: o(l, "ButtonIcon"),
30
+ Checkbox: o(d, "Checkbox"),
31
+ CheckboxGroup: o(x, "CheckboxGroup"),
32
+ Menu: o(h, "Menu"),
33
+ Radio: o(C, "Radio"),
34
+ RadioGroup: o(b, "RadioGroup"),
35
+ Switch: o(B, "Switch"),
36
+ Table: o(T, "Table"),
37
+ Text: o(g, "Text"),
38
+ TextInput: o(k, "TextInput"),
39
+ Dialog: o(G, "Dialog")
40
+ };
41
+ function z(a = {}) {
42
+ const t = { ...f };
43
+ for (const [e, r] of Object.entries(a)) {
44
+ const n = e;
45
+ if (e in p) {
46
+ const m = p[e];
47
+ t[n] = m(r);
48
+ } else
49
+ t[n] = r;
50
+ }
51
+ return t;
52
+ }
53
+ export {
54
+ p as componentCreators,
55
+ z as createComponents
56
+ };
57
+ //# sourceMappingURL=createComponentsWithDefaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createComponentsWithDefaults.js","sources":["../../../src/contexts/ComponentAdapter/createComponentsWithDefaults.ts"],"sourcesContent":["import type React from 'react'\nimport type { ComponentsContextType } from './useComponentContext'\nimport { defaultComponents } from './adapters/defaultComponentAdapter'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n// Import prop types and their defaults\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { AlertDefaults } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { BadgeDefaults } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { ButtonDefaults, ButtonIconDefaults } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { CheckboxDefaults } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroupDefaults } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { MenuDefaults } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { RadioDefaults } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroupDefaults } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { SwitchDefaults } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport { TableDefaults } from '@/components/Common/UI/Table/TableTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { TextDefaults } from '@/components/Common/UI/Text/TextTypes'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInputDefaults } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { DialogDefaults } from '@/components/Common/UI/Dialog/DialogTypes'\n\nfunction composeWithDefaults<TProps>(defaults: Partial<TProps>, componentName: string) {\n return (customComponent: (props: TProps) => React.ReactElement | null) => {\n const wrappedComponent = (props: TProps) => {\n const propsWithDefaults = applyMissingDefaults(props, defaults)\n return customComponent(propsWithDefaults)\n }\n wrappedComponent.displayName = `withAutoDefault(${componentName})`\n return wrappedComponent\n }\n}\n\n// Component creators with defaults\nexport const componentCreators = {\n Alert: composeWithDefaults<AlertProps>(AlertDefaults, 'Alert'),\n Badge: composeWithDefaults<BadgeProps>(BadgeDefaults, 'Badge'),\n Button: composeWithDefaults<ButtonProps>(ButtonDefaults, 'Button'),\n ButtonIcon: composeWithDefaults<ButtonIconProps>(ButtonIconDefaults, 'ButtonIcon'),\n Checkbox: composeWithDefaults<CheckboxProps>(CheckboxDefaults, 'Checkbox'),\n CheckboxGroup: composeWithDefaults<CheckboxGroupProps>(CheckboxGroupDefaults, 'CheckboxGroup'),\n Menu: composeWithDefaults<MenuProps>(MenuDefaults, 'Menu'),\n Radio: composeWithDefaults<RadioProps>(RadioDefaults, 'Radio'),\n RadioGroup: composeWithDefaults<RadioGroupProps>(RadioGroupDefaults, 'RadioGroup'),\n Switch: composeWithDefaults<SwitchProps>(SwitchDefaults, 'Switch'),\n Table: composeWithDefaults<TableProps>(TableDefaults, 'Table'),\n Text: composeWithDefaults<TextProps>(TextDefaults, 'Text'),\n TextInput: composeWithDefaults<TextInputProps>(TextInputDefaults, 'TextInput'),\n Dialog: composeWithDefaults<DialogProps>(DialogDefaults, 'Dialog'),\n} as const\n\n/**\n * Creates components with automatic default prop handling.\n * Supports both partial (GustoProvider) and full (GustoProviderCustomUIAdapter) component sets.\n */\nexport function createComponents(\n providedComponents: Partial<ComponentsContextType> = {},\n): ComponentsContextType {\n const components = { ...defaultComponents }\n\n for (const [componentName, providedComponent] of Object.entries(providedComponents)) {\n const typedComponentName = componentName as keyof ComponentsContextType\n\n if (componentName in componentCreators) {\n const creatorKey = componentName as keyof typeof componentCreators\n const creator = componentCreators[creatorKey]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = creator(providedComponent as any) as any\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = providedComponent as any\n }\n }\n\n return components\n}\n"],"names":["composeWithDefaults","defaults","componentName","customComponent","wrappedComponent","props","propsWithDefaults","applyMissingDefaults","componentCreators","AlertDefaults","BadgeDefaults","ButtonDefaults","ButtonIconDefaults","CheckboxDefaults","CheckboxGroupDefaults","MenuDefaults","RadioDefaults","RadioGroupDefaults","SwitchDefaults","TableDefaults","TextDefaults","TextInputDefaults","DialogDefaults","createComponents","providedComponents","components","defaultComponents","providedComponent","typedComponentName","creator"],"mappings":";;;;;;;;;;;;;;;AAgCA,SAASA,EAA4BC,GAA2BC,GAAuB;AACrF,SAAO,CAACC,MAAkE;AACxE,UAAMC,IAAmB,CAACC,MAAkB;AAC1C,YAAMC,IAAoBC,EAAqBF,GAAOJ,CAAQ;AAC9D,aAAOE,EAAgBG,CAAiB;AAAA,IAC1C;AACA,WAAAF,EAAiB,cAAc,mBAAmBF,CAAa,KACxDE;AAAA,EACT;AACF;AAGO,MAAMI,IAAoB;AAAA,EAC/B,OAAOR,EAAgCS,GAAe,OAAO;AAAA,EAC7D,OAAOT,EAAgCU,GAAe,OAAO;AAAA,EAC7D,QAAQV,EAAiCW,GAAgB,QAAQ;AAAA,EACjE,YAAYX,EAAqCY,GAAoB,YAAY;AAAA,EACjF,UAAUZ,EAAmCa,GAAkB,UAAU;AAAA,EACzE,eAAeb,EAAwCc,GAAuB,eAAe;AAAA,EAC7F,MAAMd,EAA+Be,GAAc,MAAM;AAAA,EACzD,OAAOf,EAAgCgB,GAAe,OAAO;AAAA,EAC7D,YAAYhB,EAAqCiB,GAAoB,YAAY;AAAA,EACjF,QAAQjB,EAAiCkB,GAAgB,QAAQ;AAAA,EACjE,OAAOlB,EAAgCmB,GAAe,OAAO;AAAA,EAC7D,MAAMnB,EAA+BoB,GAAc,MAAM;AAAA,EACzD,WAAWpB,EAAoCqB,GAAmB,WAAW;AAAA,EAC7E,QAAQrB,EAAiCsB,GAAgB,QAAQ;AACnE;AAMO,SAASC,EACdC,IAAqD,IAC9B;AACvB,QAAMC,IAAa,EAAE,GAAGC,EAAA;AAExB,aAAW,CAACxB,GAAeyB,CAAiB,KAAK,OAAO,QAAQH,CAAkB,GAAG;AACnF,UAAMI,IAAqB1B;AAE3B,QAAIA,KAAiBM,GAAmB;AAEtC,YAAMqB,IAAUrB,EADGN,CACyB;AAE5C,MAAAuB,EAAWG,CAAkB,IAAIC,EAAQF,CAAwB;AAAA,IACnE;AAEE,MAAAF,EAAWG,CAAkB,IAAID;AAAA,EAErC;AAEA,SAAOF;AACT;"}
@@ -23,6 +23,7 @@ import { TextProps } from '../../components/Common/UI/Text/TextTypes';
23
23
  import { CalendarPreviewProps } from '../../components/Common/UI/CalendarPreview/CalendarPreviewTypes';
24
24
  import { ProgressBarProps } from '../../components/Common/UI/ProgressBar/ProgressBarTypes';
25
25
  import { TabsProps } from '../../components/Common/UI/Tabs/TabsTypes';
26
+ import { DialogProps } from '../../components/Common/UI/Dialog/DialogTypes';
26
27
  export interface ComponentsContextType {
27
28
  Alert: (props: AlertProps) => JSX.Element | null;
28
29
  Badge: (props: BadgeProps) => JSX.Element | null;
@@ -50,6 +51,7 @@ export interface ComponentsContextType {
50
51
  CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null;
51
52
  ProgressBar: (props: ProgressBarProps) => JSX.Element | null;
52
53
  Tabs: (props: TabsProps) => JSX.Element | null;
54
+ Dialog: (props: DialogProps) => JSX.Element | null;
53
55
  }
54
56
  export declare const ComponentsContext: import('react').Context<ComponentsContextType | null>;
55
57
  export declare const useComponentContext: () => ComponentsContextType;
@@ -1 +1 @@
1
- {"version":3,"file":"useComponentContext.js","sources":["../../../src/contexts/ComponentAdapter/useComponentContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { JSX } from 'react'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { ButtonIconProps, ButtonProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List/ListTypes'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar/ProgressBarTypes'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Button: (props: ButtonProps) => JSX.Element | null\n ButtonIcon: (props: ButtonIconProps) => JSX.Element | null\n Card: (props: CardProps) => JSX.Element | null\n Checkbox: (props: CheckboxProps) => JSX.Element | null\n CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element | null\n ComboBox: (props: ComboBoxProps) => JSX.Element | null\n DatePicker: (props: DatePickerProps) => JSX.Element | null\n OrderedList: (props: OrderedListProps) => JSX.Element | null\n UnorderedList: (props: UnorderedListProps) => JSX.Element | null\n NumberInput: (props: NumberInputProps) => JSX.Element | null\n Radio: (props: RadioProps) => JSX.Element | null\n RadioGroup: (props: RadioGroupProps) => JSX.Element | null\n Select: (props: SelectProps) => JSX.Element | null\n Switch: (props: SwitchProps) => JSX.Element | null\n TextInput: (props: TextInputProps) => JSX.Element | null\n Link: (props: LinkProps) => JSX.Element | null\n Menu: (props: MenuProps) => JSX.Element | null\n Table: (props: TableProps) => JSX.Element | null\n Heading: (props: HeadingProps) => JSX.Element | null\n PaginationControl?: (props: PaginationControlProps) => JSX.Element | null\n Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n Tabs: (props: TabsProps) => JSX.Element | null\n}\n\nexport const ComponentsContext = createContext<ComponentsContextType | null>(null)\n\nexport const useComponentContext = () => {\n const context = useContext(ComponentsContext)\n if (!context) {\n throw new Error('useComponentContext must be used within a ComponentsProvider')\n }\n return context\n}\n"],"names":["ComponentsContext","createContext","useComponentContext","context","useContext"],"mappings":";AAwDO,MAAMA,IAAoBC,EAA4C,IAAI,GAEpEC,IAAsB,MAAM;AACvC,QAAMC,IAAUC,EAAWJ,CAAiB;AAC5C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8DAA8D;AAEhF,SAAOA;AACT;"}
1
+ {"version":3,"file":"useComponentContext.js","sources":["../../../src/contexts/ComponentAdapter/useComponentContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { JSX } from 'react'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { ButtonIconProps, ButtonProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List/ListTypes'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar/ProgressBarTypes'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Button: (props: ButtonProps) => JSX.Element | null\n ButtonIcon: (props: ButtonIconProps) => JSX.Element | null\n Card: (props: CardProps) => JSX.Element | null\n Checkbox: (props: CheckboxProps) => JSX.Element | null\n CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element | null\n ComboBox: (props: ComboBoxProps) => JSX.Element | null\n DatePicker: (props: DatePickerProps) => JSX.Element | null\n OrderedList: (props: OrderedListProps) => JSX.Element | null\n UnorderedList: (props: UnorderedListProps) => JSX.Element | null\n NumberInput: (props: NumberInputProps) => JSX.Element | null\n Radio: (props: RadioProps) => JSX.Element | null\n RadioGroup: (props: RadioGroupProps) => JSX.Element | null\n Select: (props: SelectProps) => JSX.Element | null\n Switch: (props: SwitchProps) => JSX.Element | null\n TextInput: (props: TextInputProps) => JSX.Element | null\n Link: (props: LinkProps) => JSX.Element | null\n Menu: (props: MenuProps) => JSX.Element | null\n Table: (props: TableProps) => JSX.Element | null\n Heading: (props: HeadingProps) => JSX.Element | null\n PaginationControl?: (props: PaginationControlProps) => JSX.Element | null\n Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n Tabs: (props: TabsProps) => JSX.Element | null\n Dialog: (props: DialogProps) => JSX.Element | null\n}\n\nexport const ComponentsContext = createContext<ComponentsContextType | null>(null)\n\nexport const useComponentContext = () => {\n const context = useContext(ComponentsContext)\n if (!context) {\n throw new Error('useComponentContext must be used within a ComponentsProvider')\n }\n return context\n}\n"],"names":["ComponentsContext","createContext","useComponentContext","context","useContext"],"mappings":";AA0DO,MAAMA,IAAoBC,EAA4C,IAAI,GAEpEC,IAAsB,MAAM;AACvC,QAAMC,IAAUC,EAAWJ,CAAiB;AAC5C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8DAA8D;AAEhF,SAAOA;AACT;"}
@@ -1,16 +1,21 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { I18nProvider as i } from "react-aria-components";
3
- import { defaultComponents as p } from "../ComponentAdapter/adapters/defaultComponentAdapter.js";
4
- import { GustoProviderCustomUIAdapter as c } from "./GustoProviderCustomUIAdapter.js";
5
- const d = (t) => {
6
- const { children: e, components: n = {}, locale: o, ...m } = t, s = {
7
- ...p,
8
- ...n
9
- };
10
- return /* @__PURE__ */ r(c, { locale: o, ...m, components: s, children: /* @__PURE__ */ r(i, { locale: o, children: e }) });
11
- }, a = d;
2
+ import { I18nProvider as m } from "react-aria-components";
3
+ import { createComponents as s } from "../ComponentAdapter/createComponentsWithDefaults.js";
4
+ import { GustoProviderCustomUIAdapter as p } from "./GustoProviderCustomUIAdapter.js";
5
+ const c = (t) => {
6
+ const { children: e, components: n = {}, locale: o, ...i } = t;
7
+ return /* @__PURE__ */ r(
8
+ p,
9
+ {
10
+ locale: o,
11
+ ...i,
12
+ components: s(n),
13
+ children: /* @__PURE__ */ r(m, { locale: o, children: e })
14
+ }
15
+ );
16
+ }, f = c;
12
17
  export {
13
- a as GustoApiProvider,
14
- d as GustoProvider
18
+ f as GustoApiProvider,
19
+ c as GustoProvider
15
20
  };
16
21
  //# sourceMappingURL=GustoProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GustoProvider.js","sources":["../../../src/contexts/GustoProvider/GustoProvider.tsx"],"sourcesContent":["import type React from 'react'\n// GustoProvider uses react-aria as the default components so we need to include the react-aria I18nProvider here.\n// For use without react-aria, the GustoProviderCustomUIAdapter can be used which does not includes it.\n// eslint-disable-next-line no-restricted-imports\nimport { I18nProvider } from 'react-aria-components'\nimport { defaultComponents } from '../ComponentAdapter/adapters/defaultComponentAdapter'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport {\n GustoProviderCustomUIAdapter,\n type GustoProviderProps,\n} from './GustoProviderCustomUIAdapter'\n\nexport interface GustoApiProps extends Omit<GustoProviderProps, 'components'> {\n components?: Partial<ComponentsContextType>\n children?: React.ReactNode\n}\n\nconst GustoProvider: React.FC<GustoApiProps> = props => {\n const { children, components = {}, locale, ...remainingProps } = props\n\n const mergedComponents = {\n ...defaultComponents,\n ...components,\n }\n\n return (\n <GustoProviderCustomUIAdapter locale={locale} {...remainingProps} components={mergedComponents}>\n {/* react-aria locale provider that exposes correct locale to number formatters */}\n <I18nProvider locale={locale}>{children}</I18nProvider>\n </GustoProviderCustomUIAdapter>\n )\n}\n\nexport { GustoProvider }\n\n/** @deprecated Import from `GustoProvider` instead */\nexport const GustoApiProvider = GustoProvider\n"],"names":["GustoProvider","props","children","components","locale","remainingProps","mergedComponents","defaultComponents","jsx","GustoProviderCustomUIAdapter","I18nProvider","GustoApiProvider"],"mappings":";;;;AAiBA,MAAMA,IAAyC,CAAAC,MAAS;AACtD,QAAM,EAAE,UAAAC,GAAU,YAAAC,IAAa,CAAA,GAAI,QAAAC,GAAQ,GAAGC,MAAmBJ,GAE3DK,IAAmB;AAAA,IACvB,GAAGC;AAAA,IACH,GAAGJ;AAAA,EAAA;AAGL,SACE,gBAAAK,EAACC,GAAA,EAA6B,QAAAL,GAAiB,GAAGC,GAAgB,YAAYC,GAE5E,UAAA,gBAAAE,EAACE,GAAA,EAAa,QAAAN,GAAiB,UAAAF,EAAA,CAAS,EAAA,CAC1C;AAEJ,GAKaS,IAAmBX;"}
1
+ {"version":3,"file":"GustoProvider.js","sources":["../../../src/contexts/GustoProvider/GustoProvider.tsx"],"sourcesContent":["import type React from 'react'\n// GustoProvider uses react-aria as the default components so we need to include the react-aria I18nProvider here.\n// For use without react-aria, the GustoProviderCustomUIAdapter can be used which does not includes it.\n// eslint-disable-next-line no-restricted-imports\nimport { I18nProvider } from 'react-aria-components'\nimport { createComponents } from '../ComponentAdapter/createComponentsWithDefaults'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport {\n GustoProviderCustomUIAdapter,\n type GustoProviderProps,\n} from './GustoProviderCustomUIAdapter'\n\nexport interface GustoApiProps extends Omit<GustoProviderProps, 'components'> {\n components?: Partial<ComponentsContextType>\n children?: React.ReactNode\n}\n\nconst GustoProvider: React.FC<GustoApiProps> = props => {\n const { children, components = {}, locale, ...remainingProps } = props\n\n return (\n <GustoProviderCustomUIAdapter\n locale={locale}\n {...remainingProps}\n components={createComponents(components)}\n >\n {/* react-aria locale provider that exposes correct locale to number formatters */}\n <I18nProvider locale={locale}>{children}</I18nProvider>\n </GustoProviderCustomUIAdapter>\n )\n}\n\nexport { GustoProvider }\n\n/** @deprecated Import from `GustoProvider` instead */\nexport const GustoApiProvider = GustoProvider\n"],"names":["GustoProvider","props","children","components","locale","remainingProps","jsx","GustoProviderCustomUIAdapter","createComponents","I18nProvider","GustoApiProvider"],"mappings":";;;;AAiBA,MAAMA,IAAyC,CAAAC,MAAS;AACtD,QAAM,EAAE,UAAAC,GAAU,YAAAC,IAAa,CAAA,GAAI,QAAAC,GAAQ,GAAGC,MAAmBJ;AAEjE,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAAH;AAAA,MACC,GAAGC;AAAA,MACJ,YAAYG,EAAiBL,CAAU;AAAA,MAGvC,UAAA,gBAAAG,EAACG,GAAA,EAAa,QAAAL,GAAiB,UAAAF,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAG9C,GAKaQ,IAAmBV;"}
@@ -3,24 +3,24 @@ import { ErrorBoundary as h } from "react-error-boundary";
3
3
  import { I18nextProvider as v } from "react-i18next";
4
4
  import { useEffect as g } from "react";
5
5
  import { ComponentsProvider as P } from "../ComponentAdapter/ComponentsProvider.js";
6
+ import { createComponents as C } from "../ComponentAdapter/createComponentsWithDefaults.js";
6
7
  import { ApiProvider as I } from "../ApiProvider/ApiProvider.js";
7
8
  import { LoadingIndicatorProvider as x } from "../LoadingIndicatorProvider/LoadingIndicatorProvider.js";
8
9
  import { SDKI18next as t } from "./SDKI18next.js";
9
10
  import "classnames";
10
- import "../../shared/constants.js";
11
11
  import { InternalError as y } from "../../components/Common/InternalError/InternalError.js";
12
- import { LocaleProvider as C } from "../LocaleProvider/LocaleProvider.js";
12
+ import { LocaleProvider as L } from "../LocaleProvider/LocaleProvider.js";
13
13
  import "../LocaleProvider/useLocale.js";
14
- import { ThemeProvider as L } from "../ThemeProvider/ThemeProvider.js";
15
- const T = (a) => {
14
+ import { ThemeProvider as U } from "../ThemeProvider/ThemeProvider.js";
15
+ const q = (a) => {
16
16
  const {
17
- children: d,
17
+ children: c,
18
18
  config: e,
19
19
  dictionary: o,
20
20
  lng: n = "en",
21
- locale: c = "en-US",
22
- currency: l = "USD",
23
- theme: p,
21
+ locale: d = "en-US",
22
+ currency: p = "USD",
23
+ theme: l,
24
24
  components: s,
25
25
  LoaderComponent: f
26
26
  } = a;
@@ -38,9 +38,9 @@ const T = (a) => {
38
38
  }
39
39
  return g(() => {
40
40
  (async () => await t.changeLanguage(n))();
41
- }, [n]), /* @__PURE__ */ r(P, { value: s, children: /* @__PURE__ */ r(x, { value: f, children: /* @__PURE__ */ r(h, { FallbackComponent: y, children: /* @__PURE__ */ r(L, { theme: p, children: /* @__PURE__ */ r(C, { locale: c, currency: l, children: /* @__PURE__ */ r(v, { i18n: t, children: /* @__PURE__ */ r(I, { url: e.baseUrl, headers: e.headers, hooks: e.hooks, children: d }) }, n) }) }) }) }) });
41
+ }, [n]), /* @__PURE__ */ r(P, { value: C(s), children: /* @__PURE__ */ r(x, { value: f, children: /* @__PURE__ */ r(h, { FallbackComponent: y, children: /* @__PURE__ */ r(U, { theme: l, children: /* @__PURE__ */ r(L, { locale: d, currency: p, children: /* @__PURE__ */ r(v, { i18n: t, children: /* @__PURE__ */ r(I, { url: e.baseUrl, headers: e.headers, hooks: e.hooks, children: c }) }, n) }) }) }) }) });
42
42
  };
43
43
  export {
44
- T as GustoProviderCustomUIAdapter
44
+ q as GustoProviderCustomUIAdapter
45
45
  };
46
46
  //# sourceMappingURL=GustoProviderCustomUIAdapter.js.map