@gusto/embedded-react-sdk 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/UNSTABLE_Hooks.d.ts +1 -0
  3. package/dist/UNSTABLE_Hooks.js +9 -0
  4. package/dist/UNSTABLE_Hooks.js.map +1 -0
  5. package/dist/assets/icons/coins-hand.svg.js +10 -0
  6. package/dist/assets/icons/coins-hand.svg.js.map +1 -0
  7. package/dist/components/Base/Base.d.ts +19 -4
  8. package/dist/components/Base/Base.js +67 -61
  9. package/dist/components/Base/Base.js.map +1 -1
  10. package/dist/components/Base/useBase.d.ts +1 -1
  11. package/dist/components/Base/useBase.js.map +1 -1
  12. package/dist/components/Base/useBaseSubmit.d.ts +10 -0
  13. package/dist/components/Base/useBaseSubmit.js +33 -0
  14. package/dist/components/Base/useBaseSubmit.js.map +1 -0
  15. package/dist/components/Common/Fields/TextAreaField/TextAreaField.d.ts +5 -0
  16. package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +34 -0
  17. package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -0
  18. package/dist/components/Common/Fields/TextAreaField/index.d.ts +3 -0
  19. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +10 -10
  20. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  21. package/dist/components/Common/SignatureForm/SignatureForm.js +14 -11
  22. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  23. package/dist/components/Common/SignatureForm/SignatureFormActions.js +9 -7
  24. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  25. package/dist/components/Common/SignatureForm/SignatureFormFields.js +15 -12
  26. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  27. package/dist/components/Common/UI/Alert/Alert.js +23 -22
  28. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  29. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +4 -0
  30. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
  31. package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
  32. package/dist/components/Common/UI/DatePicker/DatePicker.js +38 -37
  33. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  34. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +4 -0
  35. package/dist/components/Common/UI/Modal/Modal.module.scss.js +17 -17
  36. package/dist/components/Common/UI/Select/Select.d.ts +1 -1
  37. package/dist/components/Common/UI/Select/Select.js +27 -26
  38. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  39. package/dist/components/Common/UI/Select/SelectTypes.d.ts +4 -0
  40. package/dist/components/Common/UI/TextArea/TextArea.d.ts +2 -0
  41. package/dist/components/Common/UI/TextArea/TextArea.js +79 -0
  42. package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -0
  43. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +12 -0
  44. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js.map +1 -0
  45. package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +37 -0
  46. package/dist/components/Common/UI/TextArea/TextAreaTypes.js +9 -0
  47. package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -0
  48. package/dist/components/Common/UI/TextArea/index.d.ts +4 -0
  49. package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
  50. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +5 -2
  52. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +4 -2
  54. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +9 -7
  56. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  58. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  59. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +4 -2
  61. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  62. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +12 -10
  63. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  64. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +6 -6
  65. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  66. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  67. package/dist/components/Company/AssignSignatory/TitleSelect.js +6 -4
  68. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  69. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  70. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  71. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +10 -9
  72. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  73. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -8
  74. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  75. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  76. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  77. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -8
  78. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  79. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +10 -8
  80. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  81. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +7 -4
  82. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  83. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +4 -2
  84. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  85. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -9
  86. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  87. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  88. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  89. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +10 -8
  90. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  91. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
  92. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  93. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  94. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  95. package/dist/components/Company/FederalTaxes/FederalTaxes.js +5 -3
  96. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  97. package/dist/components/Company/FederalTaxes/Form.js +7 -6
  98. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  99. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +7 -6
  100. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  101. package/dist/components/Company/Industry/Actions.js +9 -7
  102. package/dist/components/Company/Industry/Actions.js.map +1 -1
  103. package/dist/components/Company/Industry/Context.js +8 -7
  104. package/dist/components/Company/Industry/Context.js.map +1 -1
  105. package/dist/components/Company/Industry/Edit.js +7 -4
  106. package/dist/components/Company/Industry/Edit.js.map +1 -1
  107. package/dist/components/Company/Locations/LocationForm/Actions.js +10 -8
  108. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  109. package/dist/components/Company/Locations/LocationForm/Form.js +7 -6
  110. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  111. package/dist/components/Company/Locations/LocationForm/LocationForm.js +12 -10
  112. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  113. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  114. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  115. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  116. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  117. package/dist/components/Company/Locations/LocationsList/List.js +16 -15
  118. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  119. package/dist/components/Company/Locations/LocationsList/LocationsList.js +4 -3
  120. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  121. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  122. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  123. package/dist/components/Company/OnboardingOverview/Completed.js +12 -10
  124. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  125. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +11 -9
  126. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  127. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +9 -7
  128. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  129. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  130. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  131. package/dist/components/Company/PaySchedule/PaySchedule.js +5 -4
  132. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  133. package/dist/components/Company/PaySchedule/_parts/Actions.js +11 -9
  134. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  135. package/dist/components/Company/PaySchedule/_parts/Edit.js +23 -24
  136. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  137. package/dist/components/Company/PaySchedule/_parts/Head.js +13 -11
  138. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  139. package/dist/components/Company/PaySchedule/_parts/List.js +18 -17
  140. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  141. package/dist/components/Company/PaySchedule/usePaySchedule.js +7 -6
  142. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  143. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +4 -2
  144. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  145. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  146. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  147. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +4 -2
  148. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  149. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +4 -2
  150. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  151. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  152. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  153. package/dist/components/Contractor/Address/Address.js +7 -5
  154. package/dist/components/Contractor/Address/Address.js.map +1 -1
  155. package/dist/components/Contractor/Address/Form.js +8 -7
  156. package/dist/components/Contractor/Address/Form.js.map +1 -1
  157. package/dist/components/Contractor/Address/useAddress.js +7 -6
  158. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  159. package/dist/components/Contractor/ContractorList/index.js +15 -15
  160. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
  161. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  162. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +5 -3
  163. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  164. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +15 -0
  165. package/dist/components/Contractor/Payments/Detail/DetailPresentation.d.ts +19 -0
  166. package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +18 -0
  167. package/dist/components/Contractor/Payments/PaymentEdit/PaymentEditPresentation.d.ts +6 -0
  168. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +18 -0
  169. package/dist/components/Contractor/Payments/types.d.ts +4 -0
  170. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  171. package/dist/components/Contractor/Profile/useContractorProfile.js +1 -1
  172. package/dist/components/Contractor/Submit/Submit.js +21 -20
  173. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  174. package/dist/components/Employee/Compensation/Actions.js +14 -13
  175. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  176. package/dist/components/Employee/Compensation/Edit.js +14 -14
  177. package/dist/components/Employee/Compensation/List.js +23 -22
  178. package/dist/components/Employee/Compensation/List.js.map +1 -1
  179. package/dist/components/Employee/Deductions/Deductions.d.ts +1 -1
  180. package/dist/components/Employee/Deductions/Deductions.js +10 -10
  181. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  182. package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +2 -0
  183. package/dist/components/Employee/Deductions/DeductionsComponents.js +6 -6
  184. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  185. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +222 -0
  186. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
  187. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
  188. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
  189. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -2
  190. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +165 -0
  191. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
  192. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +0 -34
  193. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -127
  194. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  195. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
  196. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
  197. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +55 -55
  198. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  199. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +6 -0
  200. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +53 -0
  201. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -0
  202. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +14 -0
  203. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -0
  204. package/dist/components/Employee/Deductions/stateMachine.js +49 -29
  205. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  206. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  207. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  208. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +5 -3
  209. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  210. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +5 -2
  211. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  212. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  213. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  214. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +5 -3
  215. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  216. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
  217. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  218. package/dist/components/Employee/EmployeeList/Actions.js +8 -6
  219. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  220. package/dist/components/Employee/EmployeeList/EmployeeList.js +6 -3
  221. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  222. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  223. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  224. package/dist/components/Employee/EmployeeList/List.js +14 -14
  225. package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -4
  226. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  227. package/dist/components/Employee/FederalTaxes/Actions.js +9 -7
  228. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  229. package/dist/components/Employee/FederalTaxes/FederalForm.js +13 -11
  230. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  231. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +5 -4
  232. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  233. package/dist/components/Employee/Landing/Landing.js +11 -10
  234. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  235. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  236. package/dist/components/Employee/PaymentMethod/Actions.js +8 -6
  237. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  238. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +6 -4
  239. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  240. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -11
  241. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  242. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -6
  243. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  244. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  245. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +7 -6
  246. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  247. package/dist/components/Employee/Profile/Actions.js +9 -7
  248. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  249. package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -8
  250. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  251. package/dist/components/Employee/Profile/HomeAddress.js +2 -2
  252. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +26 -24
  253. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  254. package/dist/components/Employee/Profile/useProfile.js +5 -4
  255. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  256. package/dist/components/Employee/StateTaxes/Actions.js +10 -8
  257. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  258. package/dist/components/Employee/StateTaxes/useStateTaxes.js +5 -4
  259. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  260. package/dist/components/Employee/Taxes/Actions.js +10 -8
  261. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  262. package/dist/components/Employee/Taxes/FederalForm.js +14 -12
  263. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  264. package/dist/components/Employee/Taxes/useTaxes.js +5 -4
  265. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  266. package/dist/components/Flow/Flow.js +23 -21
  267. package/dist/components/Flow/Flow.js.map +1 -1
  268. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +1 -1
  269. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +58 -36
  270. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  271. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +2 -0
  272. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +71 -54
  273. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  274. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +23 -0
  275. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +27 -15
  276. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
  277. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +25 -2
  278. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +153 -23
  279. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  280. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js +10 -0
  281. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js.map +1 -0
  282. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +9 -1
  283. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +195 -22
  284. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  285. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +18 -0
  286. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js.map +1 -0
  287. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +10 -2
  288. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +39 -25
  289. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
  290. package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -0
  291. package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +5 -0
  292. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +8 -6
  293. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  294. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +8 -6
  295. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  296. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +27 -28
  297. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  298. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +56 -57
  299. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  300. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
  301. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  302. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -12
  303. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +44 -52
  304. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  305. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +9 -6
  306. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +96 -93
  307. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  308. package/dist/components/Payroll/PayrollList/PayrollList.js +58 -59
  309. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  310. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +4 -6
  311. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +81 -72
  312. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  313. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +8 -8
  314. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +4 -2
  315. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -1
  316. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  317. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  318. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +7 -0
  319. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js +19 -0
  320. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -0
  321. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js +10 -0
  322. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js.map +1 -0
  323. package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +4 -0
  324. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +33 -0
  325. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +161 -0
  326. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -0
  327. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +3 -0
  328. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js +17 -0
  329. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -0
  330. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.test.d.ts +1 -0
  331. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
  332. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +70 -0
  333. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
  334. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +7 -0
  335. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +6 -0
  336. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -0
  337. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +9 -0
  338. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +40 -0
  339. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +1 -0
  340. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +5 -0
  341. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +2 -0
  342. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +12 -0
  343. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +1 -0
  344. package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +2 -0
  345. package/dist/components/Payroll/helpers.d.ts +0 -5
  346. package/dist/components/Payroll/helpers.js +106 -112
  347. package/dist/components/Payroll/helpers.js.map +1 -1
  348. package/dist/components/Payroll/usePreparedPayrollData.js +8 -7
  349. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  350. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
  351. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  352. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  353. package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
  354. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  355. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -5
  356. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  357. package/dist/helpers/dateFormatting.d.ts +9 -0
  358. package/dist/helpers/dateFormatting.js +65 -52
  359. package/dist/helpers/dateFormatting.js.map +1 -1
  360. package/dist/helpers/formattedStrings.js +12 -11
  361. package/dist/helpers/formattedStrings.js.map +1 -1
  362. package/dist/i18n/I18n.js +10 -10
  363. package/dist/i18n/I18n.js.map +1 -1
  364. package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js +32 -0
  365. package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js.map +1 -0
  366. package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +24 -0
  367. package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +1 -0
  368. package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js +32 -0
  369. package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js.map +1 -0
  370. package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js +32 -0
  371. package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js.map +1 -0
  372. package/dist/i18n/en/Payroll.Common.json.js +8 -0
  373. package/dist/i18n/en/Payroll.Common.json.js.map +1 -0
  374. package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +25 -5
  375. package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -1
  376. package/dist/i18n/en/Payroll.PayrollList.json.js +14 -16
  377. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  378. package/dist/i18n/en/Payroll.WireInstructions.json.js +22 -6
  379. package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
  380. package/dist/shared/constants.d.ts +6 -0
  381. package/dist/shared/constants.js +15 -12
  382. package/dist/shared/constants.js.map +1 -1
  383. package/dist/style.css +1 -1
  384. package/dist/types/i18next.d.ts +183 -8
  385. package/package.json +11 -7
  386. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +0 -7
  387. package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +0 -6
  388. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +0 -15
  389. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +0 -49
  390. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +0 -1
@@ -1,69 +1,71 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
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
- import { CheckboxGroup as i } from "../../../components/Common/UI/CheckboxGroup/CheckboxGroup.js";
5
- import { ComboBox as e } from "../../../components/Common/UI/ComboBox/ComboBox.js";
6
- import { Checkbox as p } from "../../../components/Common/UI/Checkbox/Checkbox.js";
3
+ import { TextArea as t } from "../../../components/Common/UI/TextArea/TextArea.js";
4
+ import { NumberInput as i } from "../../../components/Common/UI/NumberInput/NumberInput.js";
5
+ import { CheckboxGroup as e } from "../../../components/Common/UI/CheckboxGroup/CheckboxGroup.js";
6
+ import { ComboBox as p } from "../../../components/Common/UI/ComboBox/ComboBox.js";
7
+ import { Checkbox as a } from "../../../components/Common/UI/Checkbox/Checkbox.js";
7
8
  import { DatePicker as n } from "../../../components/Common/UI/DatePicker/DatePicker.js";
8
- import { Radio as a } from "../../../components/Common/UI/Radio/Radio.js";
9
- import { RadioGroup as f } from "../../../components/Common/UI/RadioGroup/RadioGroup.js";
10
- import { Select as d } from "../../../components/Common/UI/Select/Select.js";
11
- import { Switch as s } from "../../../components/Common/UI/Switch/Switch.js";
12
- import { Button as u } from "../../../components/Common/UI/Button/Button.js";
13
- import { ButtonIcon as c } from "../../../components/Common/UI/Button/ButtonIcon.js";
14
- import { Alert as b } from "../../../components/Common/UI/Alert/Alert.js";
9
+ import { Radio as f } from "../../../components/Common/UI/Radio/Radio.js";
10
+ import { RadioGroup as d } from "../../../components/Common/UI/RadioGroup/RadioGroup.js";
11
+ import { Select as s } from "../../../components/Common/UI/Select/Select.js";
12
+ import { Switch as u } from "../../../components/Common/UI/Switch/Switch.js";
13
+ import { Button as c } from "../../../components/Common/UI/Button/Button.js";
14
+ import { ButtonIcon as b } from "../../../components/Common/UI/Button/ButtonIcon.js";
15
+ import { Alert as x } from "../../../components/Common/UI/Alert/Alert.js";
15
16
  import { Card as B } from "../../../components/Common/UI/Card/Card.js";
16
17
  import { Badge as l } from "../../../components/Common/UI/Badge/Badge.js";
17
- import { Banner as x } from "../../../components/Common/UI/Banner/Banner.js";
18
- import { Link as C } from "../../../components/Common/UI/Link/Link.js";
19
- import { Menu as g } from "../../../components/Common/UI/Menu/Menu.js";
20
- import { Table as L } from "../../../components/Common/UI/Table/Table.js";
18
+ import { Banner as C } from "../../../components/Common/UI/Banner/Banner.js";
19
+ import { Link as g } from "../../../components/Common/UI/Link/Link.js";
20
+ import { Menu as L } from "../../../components/Common/UI/Menu/Menu.js";
21
+ import { Table as T } from "../../../components/Common/UI/Table/Table.js";
21
22
  import { OrderedList as k } from "../../../components/Common/UI/List/OrderedList.js";
22
- import { UnorderedList as T } from "../../../components/Common/UI/List/UnorderedList.js";
23
- import { Heading as h } from "../../../components/Common/UI/Heading/Heading.js";
24
- import { Text as D } from "../../../components/Common/UI/Text/Text.js";
25
- import { CalendarPreview as I } from "../../../components/Common/UI/CalendarPreview/CalendarPreview.js";
26
- import { ProgressBar as P } from "../../../components/Common/UI/ProgressBar/ProgressBar.js";
27
- import { Breadcrumbs as S } from "../../../components/Common/UI/Breadcrumbs/Breadcrumbs.js";
28
- import { Tabs as w } from "../../../components/Common/UI/Tabs/Tabs.js";
23
+ import { UnorderedList as h } from "../../../components/Common/UI/List/UnorderedList.js";
24
+ import { Heading as D } from "../../../components/Common/UI/Heading/Heading.js";
25
+ import { Text as I } from "../../../components/Common/UI/Text/Text.js";
26
+ import { CalendarPreview as P } from "../../../components/Common/UI/CalendarPreview/CalendarPreview.js";
27
+ import { ProgressBar as S } from "../../../components/Common/UI/ProgressBar/ProgressBar.js";
28
+ import { Breadcrumbs as w } from "../../../components/Common/UI/Breadcrumbs/Breadcrumbs.js";
29
+ import { Tabs as A } from "../../../components/Common/UI/Tabs/Tabs.js";
29
30
  import { Dialog as G } from "../../../components/Common/UI/Dialog/Dialog.js";
30
31
  import { Modal as M } from "../../../components/Common/UI/Modal/Modal.js";
31
32
  import { LoadingSpinner as R } from "../../../components/Common/UI/LoadingSpinner/LoadingSpinner.js";
32
33
  import { DescriptionList as v } from "../../../components/Common/UI/DescriptionList/DescriptionList.js";
33
- const sr = {
34
- Alert: (r) => /* @__PURE__ */ o(b, { ...r }),
34
+ const cr = {
35
+ Alert: (r) => /* @__PURE__ */ o(x, { ...r }),
35
36
  Badge: (r) => /* @__PURE__ */ o(l, { ...r }),
36
- Banner: (r) => /* @__PURE__ */ o(x, { ...r }),
37
- Button: (r) => /* @__PURE__ */ o(u, { ...r }),
38
- ButtonIcon: (r) => /* @__PURE__ */ o(c, { ...r }),
37
+ Banner: (r) => /* @__PURE__ */ o(C, { ...r }),
38
+ Button: (r) => /* @__PURE__ */ o(c, { ...r }),
39
+ ButtonIcon: (r) => /* @__PURE__ */ o(b, { ...r }),
39
40
  Card: (r) => /* @__PURE__ */ o(B, { ...r }),
40
41
  TextInput: (r) => /* @__PURE__ */ o(m, { ...r }),
41
- Checkbox: (r) => /* @__PURE__ */ o(p, { ...r }),
42
- CheckboxGroup: (r) => /* @__PURE__ */ o(i, { ...r }),
43
- ComboBox: (r) => /* @__PURE__ */ o(e, { ...r }),
42
+ TextArea: (r) => /* @__PURE__ */ o(t, { ...r }),
43
+ Checkbox: (r) => /* @__PURE__ */ o(a, { ...r }),
44
+ CheckboxGroup: (r) => /* @__PURE__ */ o(e, { ...r }),
45
+ ComboBox: (r) => /* @__PURE__ */ o(p, { ...r }),
44
46
  DatePicker: (r) => /* @__PURE__ */ o(n, { ...r }),
45
47
  OrderedList: (r) => /* @__PURE__ */ o(k, { ...r }),
46
- UnorderedList: (r) => /* @__PURE__ */ o(T, { ...r }),
47
- NumberInput: (r) => /* @__PURE__ */ o(t, { ...r }),
48
- Radio: (r) => /* @__PURE__ */ o(a, { ...r }),
49
- RadioGroup: (r) => /* @__PURE__ */ o(f, { ...r }),
50
- Select: (r) => /* @__PURE__ */ o(d, { ...r }),
51
- Switch: (r) => /* @__PURE__ */ o(s, { ...r }),
52
- Link: (r) => /* @__PURE__ */ o(C, { ...r }),
53
- Menu: (r) => /* @__PURE__ */ o(g, { ...r }),
54
- Table: (r) => /* @__PURE__ */ o(L, { ...r }),
55
- Heading: (r) => /* @__PURE__ */ o(h, { ...r }),
56
- Text: (r) => /* @__PURE__ */ o(D, { ...r }),
57
- CalendarPreview: (r) => /* @__PURE__ */ o(I, { ...r }),
58
- ProgressBar: (r) => /* @__PURE__ */ o(P, { ...r }),
59
- Breadcrumbs: (r) => /* @__PURE__ */ o(S, { ...r }),
60
- Tabs: (r) => /* @__PURE__ */ o(w, { ...r }),
48
+ UnorderedList: (r) => /* @__PURE__ */ o(h, { ...r }),
49
+ NumberInput: (r) => /* @__PURE__ */ o(i, { ...r }),
50
+ Radio: (r) => /* @__PURE__ */ o(f, { ...r }),
51
+ RadioGroup: (r) => /* @__PURE__ */ o(d, { ...r }),
52
+ Select: (r) => /* @__PURE__ */ o(s, { ...r }),
53
+ Switch: (r) => /* @__PURE__ */ o(u, { ...r }),
54
+ Link: (r) => /* @__PURE__ */ o(g, { ...r }),
55
+ Menu: (r) => /* @__PURE__ */ o(L, { ...r }),
56
+ Table: (r) => /* @__PURE__ */ o(T, { ...r }),
57
+ Heading: (r) => /* @__PURE__ */ o(D, { ...r }),
58
+ Text: (r) => /* @__PURE__ */ o(I, { ...r }),
59
+ CalendarPreview: (r) => /* @__PURE__ */ o(P, { ...r }),
60
+ ProgressBar: (r) => /* @__PURE__ */ o(S, { ...r }),
61
+ Breadcrumbs: (r) => /* @__PURE__ */ o(w, { ...r }),
62
+ Tabs: (r) => /* @__PURE__ */ o(A, { ...r }),
61
63
  Dialog: (r) => /* @__PURE__ */ o(G, { ...r }),
62
64
  Modal: (r) => /* @__PURE__ */ o(M, { ...r }),
63
65
  LoadingSpinner: (r) => /* @__PURE__ */ o(R, { ...r }),
64
66
  DescriptionList: (r) => /* @__PURE__ */ o(v, { ...r })
65
67
  };
66
68
  export {
67
- sr as defaultComponents
69
+ cr as defaultComponents
68
70
  };
69
71
  //# 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 { Banner } from '@/components/Common/UI/Banner/Banner'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\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 { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs'\nimport { Breadcrumbs } from '@/components/Common/UI/Breadcrumbs'\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'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport { Modal } from '@/components/Common/UI/Modal'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinner } from '@/components/Common/UI/LoadingSpinner'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { DescriptionList } from '@/components/Common/UI/DescriptionList'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Banner: (props: BannerProps) => <Banner {...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 Breadcrumbs: (props: BreadcrumbsProps) => <Breadcrumbs {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n Dialog: (props: DialogProps) => <Dialog {...props} />,\n Modal: (props: ModalProps) => <Modal {...props} />,\n LoadingSpinner: (props: LoadingSpinnerProps) => <LoadingSpinner {...props} />,\n DescriptionList: (props: DescriptionListProps) => <DescriptionList {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Banner","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Breadcrumbs","Tabs","Dialog","Modal","LoadingSpinner","DescriptionList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEO,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,QAAQ,CAACA,MAAuB,gBAAAC,EAACI,GAAA,EAAQ,GAAGL,GAAO;AAAA,EACnD,YAAY,CAACA,MAA2B,gBAAAC,EAACK,GAAA,EAAY,GAAGN,GAAO;AAAA,EAC/D,MAAM,CAACA,MAAqB,gBAAAC,EAACM,GAAA,EAAM,GAAGP,GAAO;AAAA,EAC7C,WAAW,CAACA,MAA0B,gBAAAC,EAACO,GAAA,EAAW,GAAGR,GAAO;AAAA,EAC5D,UAAU,CAACA,MAAyB,gBAAAC,EAACQ,GAAA,EAAU,GAAGT,GAAO;AAAA,EACzD,eAAe,CAACA,MAA8B,gBAAAC,EAACS,GAAA,EAAe,GAAGV,GAAO;AAAA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,GAAG3B,GAAO;AAAA,EAClE,MAAM,CAACA,MAAqB,gBAAAC,EAAC2B,GAAA,EAAM,GAAG5B,GAAO;AAAA,EAC7C,QAAQ,CAACA,MAAuB,gBAAAC,EAAC4B,GAAA,EAAQ,GAAG7B,GAAO;AAAA,EACnD,OAAO,CAACA,MAAsB,gBAAAC,EAAC6B,GAAA,EAAO,GAAG9B,GAAO;AAAA,EAChD,gBAAgB,CAACA,MAA+B,gBAAAC,EAAC8B,GAAA,EAAgB,GAAG/B,GAAO;AAAA,EAC3E,iBAAiB,CAACA,MAAgC,gBAAAC,EAAC+B,GAAA,EAAiB,GAAGhC,EAAA,CAAO;AAChF;"}
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 { TextAreaProps } from '@/components/Common/UI/TextArea/TextAreaTypes'\nimport { TextArea } from '@/components/Common/UI/TextArea'\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 { Banner } from '@/components/Common/UI/Banner/Banner'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\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 { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs'\nimport { Breadcrumbs } from '@/components/Common/UI/Breadcrumbs'\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'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport { Modal } from '@/components/Common/UI/Modal'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinner } from '@/components/Common/UI/LoadingSpinner'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { DescriptionList } from '@/components/Common/UI/DescriptionList'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Banner: (props: BannerProps) => <Banner {...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 TextArea: (props: TextAreaProps) => <TextArea {...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 Breadcrumbs: (props: BreadcrumbsProps) => <Breadcrumbs {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n Dialog: (props: DialogProps) => <Dialog {...props} />,\n Modal: (props: ModalProps) => <Modal {...props} />,\n LoadingSpinner: (props: LoadingSpinnerProps) => <LoadingSpinner {...props} />,\n DescriptionList: (props: DescriptionListProps) => <DescriptionList {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Banner","Button","ButtonIcon","Card","TextInput","TextArea","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Breadcrumbs","Tabs","Dialog","Modal","LoadingSpinner","DescriptionList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEO,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,QAAQ,CAACA,MAAuB,gBAAAC,EAACI,GAAA,EAAQ,GAAGL,GAAO;AAAA,EACnD,YAAY,CAACA,MAA2B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MAAsB,gBAAAC,EAACsB,GAAA,EAAO,GAAGvB,GAAO;AAAA,EAChD,SAAS,CAACA,MAAwB,gBAAAC,EAACuB,GAAA,EAAS,GAAGxB,GAAO;AAAA,EACtD,MAAM,CAACA,MAAqB,gBAAAC,EAACwB,GAAA,EAAM,GAAGzB,GAAO;AAAA,EAC7C,iBAAiB,CAACA,MAAgC,gBAAAC,EAACyB,GAAA,EAAiB,GAAG1B,GAAO;AAAA,EAC9E,aAAa,CAACA,MAA4B,gBAAAC,EAAC0B,GAAA,EAAa,GAAG3B,GAAO;AAAA,EAClE,aAAa,CAACA,MAA4B,gBAAAC,EAAC2B,GAAA,EAAa,GAAG5B,GAAO;AAAA,EAClE,MAAM,CAACA,MAAqB,gBAAAC,EAAC4B,GAAA,EAAM,GAAG7B,GAAO;AAAA,EAC7C,QAAQ,CAACA,MAAuB,gBAAAC,EAAC6B,GAAA,EAAQ,GAAG9B,GAAO;AAAA,EACnD,OAAO,CAACA,MAAsB,gBAAAC,EAAC8B,GAAA,EAAO,GAAG/B,GAAO;AAAA,EAChD,gBAAgB,CAACA,MAA+B,gBAAAC,EAAC+B,GAAA,EAAgB,GAAGhC,GAAO;AAAA,EAC3E,iBAAiB,CAACA,MAAgC,gBAAAC,EAACgC,GAAA,EAAiB,GAAGjC,EAAA,CAAO;AAChF;"}
@@ -1,5 +1,6 @@
1
1
  import { JSX } from 'react';
2
2
  import { TextInputProps } from '../../components/Common/UI/TextInput/TextInputTypes';
3
+ import { TextAreaProps } from '../../components/Common/UI/TextArea/TextAreaTypes';
3
4
  import { NumberInputProps } from '../../components/Common/UI/NumberInput/NumberInputTypes';
4
5
  import { CheckboxGroupProps } from '../../components/Common/UI/CheckboxGroup/CheckboxGroupTypes';
5
6
  import { ComboBoxProps } from '../../components/Common/UI/ComboBox/ComboBoxTypes';
@@ -48,6 +49,7 @@ export interface ComponentsContextType {
48
49
  Select: (props: SelectProps) => JSX.Element | null;
49
50
  Switch: (props: SwitchProps) => JSX.Element | null;
50
51
  TextInput: (props: TextInputProps) => JSX.Element | null;
52
+ TextArea: (props: TextAreaProps) => JSX.Element | null;
51
53
  Link: (props: LinkProps) => JSX.Element | null;
52
54
  Menu: (props: MenuProps) => JSX.Element | null;
53
55
  Table: (props: TableProps) => JSX.Element | null;
@@ -1,6 +1,6 @@
1
- import { useContext as o, createContext as e } from "react";
2
- const n = e(null), s = () => {
3
- const t = o(n);
1
+ import { createContext as o, useContext as e } from "react";
2
+ const n = o(null), s = () => {
3
+ const t = e(n);
4
4
  if (!t)
5
5
  throw new Error("useComponentContext must be used within a ComponentsProvider");
6
6
  return t;
@@ -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 { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\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 { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs/BreadcrumbsTypes'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Banner: (props: BannerProps) => 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 Breadcrumbs: (props: BreadcrumbsProps) => JSX.Element | null\n Tabs: (props: TabsProps) => JSX.Element | null\n Dialog: (props: DialogProps) => JSX.Element | null\n Modal: (props: ModalProps) => JSX.Element | null\n LoadingSpinner: (props: LoadingSpinnerProps) => JSX.Element | null\n DescriptionList: (props: DescriptionListProps) => 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":";AAoEO,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 { TextAreaProps } from '@/components/Common/UI/TextArea/TextAreaTypes'\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 { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\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 { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs/BreadcrumbsTypes'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Banner: (props: BannerProps) => 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 TextArea: (props: TextAreaProps) => 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 Breadcrumbs: (props: BreadcrumbsProps) => JSX.Element | null\n Tabs: (props: TabsProps) => JSX.Element | null\n Dialog: (props: DialogProps) => JSX.Element | null\n Modal: (props: ModalProps) => JSX.Element | null\n LoadingSpinner: (props: LoadingSpinnerProps) => JSX.Element | null\n DescriptionList: (props: DescriptionListProps) => 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":";AAsEO,MAAMA,IAAoBC,EAA4C,IAAI,GAEpEC,IAAsB,MAAM;AACvC,QAAMC,IAAUC,EAAWJ,CAAiB;AAC5C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8DAA8D;AAEhF,SAAOA;AACT;"}
@@ -7,19 +7,22 @@ import { createComponents as C } from "../ComponentAdapter/createComponentsWithD
7
7
  import { ApiProvider as I } from "../ApiProvider/ApiProvider.js";
8
8
  import { LoadingIndicatorProvider as x } from "../LoadingIndicatorProvider/LoadingIndicatorProvider.js";
9
9
  import { SDKI18next as t } from "./SDKI18next.js";
10
+ import "../../shared/constants.js";
10
11
  import "classnames";
11
12
  import { InternalError as y } from "../../components/Common/InternalError/InternalError.js";
13
+ import "../ComponentAdapter/useComponentContext.js";
12
14
  import { LocaleProvider as L } from "../LocaleProvider/LocaleProvider.js";
15
+ import "../LocaleProvider/useLocale.js";
13
16
  import { ThemeProvider as U } from "../ThemeProvider/ThemeProvider.js";
14
- const T = (a) => {
17
+ const H = (a) => {
15
18
  const {
16
19
  children: c,
17
20
  config: e,
18
21
  dictionary: o,
19
22
  lng: n = "en",
20
23
  locale: d = "en-US",
21
- currency: l = "USD",
22
- theme: p,
24
+ currency: p = "USD",
25
+ theme: l,
23
26
  components: s,
24
27
  LoaderComponent: f
25
28
  } = a;
@@ -37,9 +40,9 @@ const T = (a) => {
37
40
  }
38
41
  return g(() => {
39
42
  (async () => await t.changeLanguage(n))();
40
- }, [n]), /* @__PURE__ */ r(P, { value: C(s), children: /* @__PURE__ */ r(x, { value: f, children: /* @__PURE__ */ r(h, { FallbackComponent: y, children: /* @__PURE__ */ r(U, { theme: p, children: /* @__PURE__ */ r(L, { locale: d, currency: l, children: /* @__PURE__ */ r(v, { i18n: t, children: /* @__PURE__ */ r(I, { url: e.baseUrl, headers: e.headers, hooks: e.hooks, children: c }) }, n) }) }) }) }) });
43
+ }, [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) }) }) }) }) });
41
44
  };
42
45
  export {
43
- T as GustoProviderCustomUIAdapter
46
+ H as GustoProviderCustomUIAdapter
44
47
  };
45
48
  //# sourceMappingURL=GustoProviderCustomUIAdapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { createComponents } from '../ComponentAdapter/createComponentsWithDefaults'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport type { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GustoSDKTheme } from '@/contexts/ThemeProvider/theme'\nimport type { ResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\n\nexport interface APIConfig {\n baseUrl: string\n headers?: HeadersInit\n hooks?: SDKHooks\n}\n\nexport interface GustoProviderProps {\n config: APIConfig\n dictionary?: ResourceDictionary\n lng?: string\n locale?: string\n currency?: string\n theme?: GustoSDKTheme\n queryClient?: QueryClient\n components: ComponentsContextType\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport interface GustoProviderCustomUIAdapterProps extends GustoProviderProps {\n children?: React.ReactNode\n}\n\n/**\n * A provider that accepts UI component adapters through the components prop\n */\nconst GustoProviderCustomUIAdapter: React.FC<GustoProviderCustomUIAdapterProps> = props => {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n components,\n LoaderComponent,\n } = props\n\n // Handle dictionary resources\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n // Adding resources overrides to i18next instance - initial load will override common namespace and add component specific dictionaries provided by partners\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n // Handle language change\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n return (\n <ComponentsProvider value={createComponents(components)}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ErrorBoundary FallbackComponent={InternalError}>\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider url={config.baseUrl} headers={config.headers} hooks={config.hooks}>\n {children}\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n )\n}\n\nexport { GustoProviderCustomUIAdapter }\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","components","LoaderComponent","language","lang","ns","SDKI18next","useEffect","ComponentsProvider","createComponents","LoadingIndicatorProvider","jsx","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":";;;;;;;;;;;;;AA4CA,MAAMA,IAA4E,CAAAC,MAAS;AACzF,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,IACET;AAGJ,MAAIG;AACF,eAAWO,KAAYP,GAAY;AACjC,YAAMQ,IAAOD;AACb,iBAAWE,KAAMT,EAAWQ,CAAI;AAE9B,QAAAE,EAAW;AAAA,UACTF;AAAA,UACAC;AAAA,UACCT,EAAWQ,CAAI,EAA8BC,CAAE;AAAA,UAChD;AAAA,UACA;AAAA,QAAA;AAAA,IAGN;AAIF,SAAAE,EAAU,MAAM;AACd,KAAM,YACJ,MAAMD,EAAW,eAAeT,CAAG;AAAA,EAEvC,GAAG,CAACA,CAAG,CAAC,qBAGLW,GAAA,EAAmB,OAAOC,EAAiBR,CAAU,GACpD,4BAACS,GAAA,EAAyB,OAAOR,GAC/B,UAAA,gBAAAS,EAACC,GAAA,EAAc,mBAAmBC,GAChC,UAAA,gBAAAF,EAACG,KAAc,OAAAd,GACb,UAAA,gBAAAW,EAACI,KAAe,QAAAjB,GAAgB,UAAAC,GAC9B,4BAACiB,GAAA,EAAgB,MAAMV,GACrB,UAAA,gBAAAK,EAACM,GAAA,EAAY,KAAKtB,EAAO,SAAS,SAASA,EAAO,SAAS,OAAOA,EAAO,OACtE,UAAAD,GACH,EAAA,GAHsCG,CAIxC,GACF,EAAA,CACF,GACF,GACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { createComponents } from '../ComponentAdapter/createComponentsWithDefaults'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport type { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GustoSDKTheme } from '@/contexts/ThemeProvider/theme'\nimport type { ResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\n\nexport interface APIConfig {\n baseUrl: string\n headers?: HeadersInit\n hooks?: SDKHooks\n}\n\nexport interface GustoProviderProps {\n config: APIConfig\n dictionary?: ResourceDictionary\n lng?: string\n locale?: string\n currency?: string\n theme?: GustoSDKTheme\n queryClient?: QueryClient\n components: ComponentsContextType\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport interface GustoProviderCustomUIAdapterProps extends GustoProviderProps {\n children?: React.ReactNode\n}\n\n/**\n * A provider that accepts UI component adapters through the components prop\n */\nconst GustoProviderCustomUIAdapter: React.FC<GustoProviderCustomUIAdapterProps> = props => {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n components,\n LoaderComponent,\n } = props\n\n // Handle dictionary resources\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n // Adding resources overrides to i18next instance - initial load will override common namespace and add component specific dictionaries provided by partners\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n // Handle language change\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n return (\n <ComponentsProvider value={createComponents(components)}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ErrorBoundary FallbackComponent={InternalError}>\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider url={config.baseUrl} headers={config.headers} hooks={config.hooks}>\n {children}\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n )\n}\n\nexport { GustoProviderCustomUIAdapter }\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","components","LoaderComponent","language","lang","ns","SDKI18next","useEffect","ComponentsProvider","createComponents","LoadingIndicatorProvider","jsx","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":";;;;;;;;;;;;;;;;AA4CA,MAAMA,IAA4E,CAAAC,MAAS;AACzF,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,IACET;AAGJ,MAAIG;AACF,eAAWO,KAAYP,GAAY;AACjC,YAAMQ,IAAOD;AACb,iBAAWE,KAAMT,EAAWQ,CAAI;AAE9B,QAAAE,EAAW;AAAA,UACTF;AAAA,UACAC;AAAA,UACCT,EAAWQ,CAAI,EAA8BC,CAAE;AAAA,UAChD;AAAA,UACA;AAAA,QAAA;AAAA,IAGN;AAIF,SAAAE,EAAU,MAAM;AACd,KAAM,YACJ,MAAMD,EAAW,eAAeT,CAAG;AAAA,EAEvC,GAAG,CAACA,CAAG,CAAC,qBAGLW,GAAA,EAAmB,OAAOC,EAAiBR,CAAU,GACpD,4BAACS,GAAA,EAAyB,OAAOR,GAC/B,UAAA,gBAAAS,EAACC,GAAA,EAAc,mBAAmBC,GAChC,UAAA,gBAAAF,EAACG,KAAc,OAAAd,GACb,UAAA,gBAAAW,EAACI,KAAe,QAAAjB,GAAgB,UAAAC,GAC9B,4BAACiB,GAAA,EAAgB,MAAMV,GACrB,UAAA,gBAAAK,EAACM,GAAA,EAAY,KAAKtB,EAAO,SAAS,SAASA,EAAO,SAAS,OAAOA,EAAO,OACtE,UAAAD,GACH,EAAA,GAHsCG,CAIxC,GACF,EAAA,CACF,GACF,GACF,EAAA,CACF;AAEJ;"}
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Normalizes any date input (string, Date, or undefined) to a Date object.
3
+ * Handles YYYY-MM-DD strings by parsing them in local timezone to avoid timezone issues.
4
+ * Also handles ISO timestamp strings for compatibility.
5
+ * Returns null for invalid inputs.
6
+ */
7
+ export declare const normalizeToDate: (dateInput?: string | Date | null) => Date | null;
1
8
  export declare const formatDateShortWithWeekday: (dateInput?: string | Date | null, locale?: string) => string;
2
9
  export declare const formatDateShortWithWeekdayAndYear: (dateInput?: string | Date | null, locale?: string) => string;
3
10
  export declare const formatDateShort: (dateInput?: string | Date | null, locale?: string) => string;
@@ -20,3 +27,5 @@ export declare const formatDateToStringDate: (date: Date) => string | null;
20
27
  * Normalizes Date to local midnight, handling timezone issues from any adapter.
21
28
  */
22
29
  export declare const normalizeDateToLocal: (date: Date | null) => Date | null;
30
+ export declare const getHoursUntil: (deadline?: Date | string | null) => number | null;
31
+ export declare const getDaysUntil: (deadline?: Date | string | null) => number | null;
@@ -1,102 +1,115 @@
1
- const m = (t) => {
1
+ const s = (t) => {
2
2
  if (!t) return null;
3
3
  if (typeof t == "string") {
4
4
  if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
5
- const r = t.split("-");
6
- if (r.length !== 3) return null;
7
- const e = r.map(Number), n = e[0], i = e[1], o = e[2];
8
- return n === void 0 || i === void 0 || o === void 0 || isNaN(n) || isNaN(i) || isNaN(o) || i < 1 || i > 12 || o < 1 || o > 31 ? null : new Date(n, i - 1, o);
5
+ const e = t.split("-");
6
+ if (e.length !== 3) return null;
7
+ const r = e.map(Number), o = r[0], i = r[1], a = r[2];
8
+ return o === void 0 || i === void 0 || a === void 0 || isNaN(o) || isNaN(i) || isNaN(a) || i < 1 || i > 12 || a < 1 || a > 31 ? null : new Date(o, i - 1, a);
9
9
  }
10
- const a = new Date(t);
11
- return isNaN(a.getTime()) ? null : a;
10
+ const n = new Date(t);
11
+ return isNaN(n.getTime()) ? null : n;
12
12
  }
13
13
  return t instanceof Date ? isNaN(t.getTime()) ? null : t : null;
14
- }, c = (t) => (a, r) => {
15
- const e = m(a);
16
- return e ? e.toLocaleDateString(r, t) : "";
14
+ }, c = (t) => (n, e) => {
15
+ const r = s(n);
16
+ return r ? r.toLocaleDateString(e, t) : "";
17
17
  }, h = c({
18
18
  weekday: "short",
19
19
  month: "short",
20
20
  day: "numeric"
21
- }), l = c({
21
+ }), d = c({
22
22
  weekday: "short",
23
23
  month: "short",
24
24
  day: "numeric",
25
25
  year: "numeric"
26
- }), d = c({
26
+ }), f = c({
27
27
  month: "short",
28
28
  day: "numeric"
29
- }), D = c({
29
+ }), g = c({
30
30
  month: "short",
31
31
  day: "numeric",
32
32
  year: "numeric"
33
- }), f = c({
33
+ }), y = c({
34
34
  month: "long",
35
35
  day: "numeric"
36
- }), y = c({
36
+ }), N = c({
37
37
  month: "long",
38
38
  day: "numeric",
39
39
  year: "numeric"
40
- }), g = (t, a) => {
41
- const r = m(t);
42
- if (!r) return { time: "", date: "" };
43
- const e = r.toLocaleTimeString(a, {
40
+ }), S = (t, n) => {
41
+ const e = s(t);
42
+ if (!e) return { time: "", date: "" };
43
+ const r = e.toLocaleTimeString(n, {
44
44
  hour: "numeric",
45
45
  minute: "2-digit",
46
46
  hour12: !0,
47
47
  timeZoneName: "short"
48
- }), n = r.toLocaleDateString(a, {
48
+ }), o = e.toLocaleDateString(n, {
49
49
  weekday: "short",
50
50
  month: "short",
51
51
  day: "numeric"
52
52
  });
53
- return { time: e, date: n };
54
- }, N = (t, a, r) => {
55
- const e = m(t), n = m(a);
56
- if (!e || !n)
53
+ return { time: r, date: o };
54
+ }, T = (t, n, e) => {
55
+ const r = s(t), o = s(n);
56
+ if (!r || !o)
57
57
  return { startDate: "", endDate: "" };
58
- const i = e.toLocaleDateString(r, {
58
+ const i = r.toLocaleDateString(e, {
59
59
  month: "long",
60
60
  day: "numeric"
61
- }), o = n.toLocaleDateString(r, {
61
+ }), a = o.toLocaleDateString(e, {
62
62
  month: "short",
63
63
  day: "numeric",
64
64
  year: "numeric"
65
65
  });
66
- return { startDate: i, endDate: o };
67
- }, S = (t, a, r, e) => {
68
- const n = m(t), i = m(a);
69
- if (!n || !i) return "";
70
- const o = e?.useShortMonth ? "short" : "long", s = n.toLocaleDateString(r, {
71
- month: o,
66
+ return { startDate: i, endDate: a };
67
+ }, w = (t, n, e, r) => {
68
+ const o = s(t), i = s(n);
69
+ if (!o || !i) return "";
70
+ const a = r?.useShortMonth ? "short" : "long", m = o.toLocaleDateString(e, {
71
+ month: a,
72
72
  day: "numeric"
73
- }), u = i.toLocaleDateString(r, {
74
- month: o,
73
+ }), l = i.toLocaleDateString(e, {
74
+ month: a,
75
75
  day: "numeric",
76
76
  year: "numeric"
77
77
  });
78
- return `${s}–${u}`;
79
- }, T = (t) => isNaN(t.getTime()) ? null : t.toISOString().split("T")[0] || null, L = (t) => {
78
+ return `${m}–${l}`;
79
+ }, L = (t) => isNaN(t.getTime()) ? null : t.toISOString().split("T")[0] || null, M = (t) => {
80
80
  if (!t || isNaN(t.getTime()))
81
81
  return null;
82
- const a = t.toISOString(), [r] = a.split("T");
83
- if (!r) return null;
84
- const e = r.split("-");
85
- if (e.length !== 3) return null;
86
- const n = e.map(Number), i = n[0], o = n[1], s = n[2];
87
- return isNaN(i) || isNaN(o) || isNaN(s) || o < 1 || o > 12 || s < 1 || s > 31 ? null : new Date(i, o - 1, s);
82
+ const n = t.toISOString(), [e] = n.split("T");
83
+ if (!e) return null;
84
+ const r = e.split("-");
85
+ if (r.length !== 3) return null;
86
+ const o = r.map(Number), i = o[0], a = o[1], m = o[2];
87
+ return isNaN(i) || isNaN(a) || isNaN(m) || a < 1 || a > 12 || m < 1 || m > 31 ? null : new Date(i, a - 1, m);
88
+ }, u = 1e3 * 60 * 60, D = u * 24, P = (t) => {
89
+ const n = s(t);
90
+ if (!n) return null;
91
+ const e = /* @__PURE__ */ new Date();
92
+ return (n.getTime() - e.getTime()) / u;
93
+ }, W = (t) => {
94
+ const n = s(t);
95
+ if (!n) return null;
96
+ const e = /* @__PURE__ */ new Date();
97
+ return (n.getTime() - e.getTime()) / D;
88
98
  };
89
99
  export {
90
- f as formatDateLong,
91
- y as formatDateLongWithYear,
92
- d as formatDateShort,
100
+ y as formatDateLong,
101
+ N as formatDateLongWithYear,
102
+ f as formatDateShort,
93
103
  h as formatDateShortWithWeekday,
94
- l as formatDateShortWithWeekdayAndYear,
95
- D as formatDateShortWithYear,
96
- T as formatDateToStringDate,
97
- g as formatDateWithTime,
98
- N as formatPayPeriod,
99
- S as formatPayPeriodRange,
100
- L as normalizeDateToLocal
104
+ d as formatDateShortWithWeekdayAndYear,
105
+ g as formatDateShortWithYear,
106
+ L as formatDateToStringDate,
107
+ S as formatDateWithTime,
108
+ T as formatPayPeriod,
109
+ w as formatPayPeriodRange,
110
+ W as getDaysUntil,
111
+ P as getHoursUntil,
112
+ M as normalizeDateToLocal,
113
+ s as normalizeToDate
101
114
  };
102
115
  //# sourceMappingURL=dateFormatting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n * Handles YYYY-MM-DD strings by parsing them in local timezone to avoid timezone issues.\n * Also handles ISO timestamp strings for compatibility.\n * Returns null for invalid inputs.\n */\nconst normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0] || null\n}\n\n/**\n * Normalizes Date to local midnight, handling timezone issues from any adapter.\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n\n const isoString = date.toISOString()\n const [datePart] = isoString.split('T')\n if (!datePart) return null\n\n const parts = datePart.split('-')\n if (parts.length !== 3) return null\n const numbers = parts.map(Number)\n const year = numbers[0]!\n const month = numbers[1]!\n const day = numbers[2]!\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n return new Date(year, month - 1, day)\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeDateToLocal","isoString","datePart"],"mappings":"AAMA,MAAMA,IAAkB,CAACC,MAAkD;AACzE,MAAI,CAACA,EAAW,QAAO;AAEvB,MAAI,OAAOA,KAAc,UAAU;AACjC,QAAI,sBAAsB,KAAKA,CAAS,GAAG;AACzC,YAAMC,IAAQD,EAAU,MAAM,GAAG;AACjC,UAAIC,EAAM,WAAW,EAAG,QAAO;AAE/B,YAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AAKrB,aAJIC,MAAS,UAAaC,MAAU,UAAaC,MAAQ,UAKvD,MAAMF,CAAI,KACV,MAAMC,CAAK,KACX,MAAMC,CAAG,KACTD,IAAQ,KACRA,IAAQ,MACRC,IAAM,KACNA,IAAM,KAEC,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AAAA,IACtC;AAEA,UAAMC,IAAa,IAAI,KAAKN,CAAS;AACrC,WAAO,MAAMM,EAAW,QAAA,CAAS,IAAI,OAAOA;AAAA,EAC9C;AAEA,SAAIN,aAAqB,OAChB,MAAMA,EAAU,QAAA,CAAS,IAAI,OAAOA,IAGtC;AACT,GAKMO,IACJ,CAACC,MACD,CAACR,GAAkCS,MAA4B;AAC7D,QAAMC,IAAOX,EAAgBC,CAAS;AACtC,SAAKU,IACEA,EAAK,mBAAmBD,GAAQD,CAAO,IAD5B;AAEpB,GAEWG,IAA6BJ,EAAoB;AAAA,EAC5D,SAAS;AAAA,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1
+ {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n * Handles YYYY-MM-DD strings by parsing them in local timezone to avoid timezone issues.\n * Also handles ISO timestamp strings for compatibility.\n * Returns null for invalid inputs.\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0] || null\n}\n\n/**\n * Normalizes Date to local midnight, handling timezone issues from any adapter.\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n\n const isoString = date.toISOString()\n const [datePart] = isoString.split('T')\n if (!datePart) return null\n\n const parts = datePart.split('-')\n if (parts.length !== 3) return null\n const numbers = parts.map(Number)\n const year = numbers[0]!\n const month = numbers[1]!\n const day = numbers[2]!\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n return new Date(year, month - 1, day)\n}\n\nconst MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeDateToLocal","isoString","datePart","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil"],"mappings":"AAMO,MAAMA,IAAkB,CAACC,MAAkD;AAChF,MAAI,CAACA,EAAW,QAAO;AAEvB,MAAI,OAAOA,KAAc,UAAU;AACjC,QAAI,sBAAsB,KAAKA,CAAS,GAAG;AACzC,YAAMC,IAAQD,EAAU,MAAM,GAAG;AACjC,UAAIC,EAAM,WAAW,EAAG,QAAO;AAE/B,YAAMC,IAAUD,EAAM,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"../contexts/LocaleProvider/useLocale.js";
5
+ const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), h = ({
5
6
  first_name: t,
6
7
  last_name: e
7
8
  }) => `${t ? c(t) : ""}${e ? n(c(e)) : ""}`, n = (t) => t ? ` ${t}` : "", i = (t) => {
8
9
  const e = n(t.street1), r = n(t.street2);
9
10
  return `${e},${r}`;
10
- }, u = (t) => `${n(t.city)}, ${n(t.state)} ${n(t.zip)}`, h = (t) => `${i(t)} ${u(t)}`, p = (t, e) => e ? `${t}%` : `$${t}`, s = (t, e = "en-US") => {
11
+ }, u = (t) => `${n(t.city)}, ${n(t.state)} ${n(t.zip)}`, C = (t) => `${i(t)} ${u(t)}`, p = (t, e) => e ? `${t}%` : `$${t}`, s = (t, e = "en-US") => {
11
12
  const r = t.toLocaleString(e, {
12
13
  minimumFractionDigits: 2,
13
14
  maximumFractionDigits: 2
14
15
  });
15
16
  return p(r, !1);
16
- }, C = ({
17
+ }, S = ({
17
18
  rate: t,
18
19
  paymentUnit: e,
19
20
  t: r,
@@ -41,20 +42,20 @@ const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), l = ({
41
42
  return o;
42
43
  }
43
44
  }, y = { ALLOWED_TAGS: ["a", "b", "strong"], ALLOWED_ATTR: ["href", "target"] };
44
- function S(t) {
45
+ function D(t) {
45
46
  return t ? { __html: m.sanitize(t, y) } : { __html: "" };
46
47
  }
47
- const D = (t) => t.replace(/\D/g, ""), F = (t) => t.replace(/_([a-z])/g, (e, r) => r.toUpperCase());
48
+ const F = (t) => t.replace(/\D/g, ""), L = (t) => t.replace(/_([a-z])/g, (e, r) => r.toUpperCase());
48
49
  export {
49
- h as addressInline,
50
+ C as addressInline,
50
51
  p as amountStr,
51
- S as createMarkup,
52
- l as firstLastName,
52
+ D as createMarkup,
53
+ h as firstLastName,
53
54
  s as formatNumberAsCurrency,
54
- C as formatPayRate,
55
+ S as formatPayRate,
55
56
  u as getCityStateZip,
56
57
  i as getStreet,
57
- D as removeNonDigits,
58
- F as snakeCaseToCamelCase
58
+ F as removeNonDigits,
59
+ L as snakeCaseToCamelCase
59
60
  };
60
61
  //# sourceMappingURL=formattedStrings.js.map