@gusto/embedded-react-sdk 0.13.0 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (582) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/_virtual/_commonjsHelpers.js +7 -0
  3. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/dist/_virtual/dynamic-import-helper.js +8 -1
  5. package/dist/_virtual/dynamic-import-helper.js.map +1 -1
  6. package/dist/_virtual/index.js +8 -0
  7. package/dist/_virtual/index.js.map +1 -0
  8. package/dist/assets/icons/close.svg.js +10 -0
  9. package/dist/assets/icons/close.svg.js.map +1 -0
  10. package/dist/components/Base/Base.js +6 -7
  11. package/dist/components/Base/Base.js.map +1 -1
  12. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  13. package/dist/components/Common/DataView/DataCards/DataCards.js +29 -24
  14. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  15. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  16. package/dist/components/Common/DataView/DataTable/DataTable.js +67 -49
  17. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  18. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  19. package/dist/components/Common/DataView/DataView.js +19 -18
  20. package/dist/components/Common/DataView/DataView.js.map +1 -1
  21. package/dist/components/Common/DataView/useDataView.d.ts +4 -1
  22. package/dist/components/Common/DataView/useDataView.js +15 -13
  23. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  24. package/dist/components/Common/FieldDescription/FieldDescription.js +7 -14
  25. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
  26. package/dist/components/Common/Fields/hooks/useField.d.ts +4 -1
  27. package/dist/components/Common/Fields/hooks/useField.js +31 -24
  28. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  29. package/dist/components/Common/ReorderableList/DropZone.js +5 -5
  30. package/dist/components/Common/ReorderableList/ReorderableItem.js +8 -8
  31. package/dist/components/Common/ReorderableList/ReorderableList.js +5 -5
  32. package/dist/components/Common/SignatureForm/SignatureForm.js +5 -8
  33. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  34. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -13
  35. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  36. package/dist/components/Common/SignatureForm/SignatureFormFields.js +10 -13
  37. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  38. package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
  39. package/dist/components/Common/UI/Alert/Alert.js +28 -21
  40. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  41. package/dist/components/Common/UI/Alert/Alert.module.scss.js +7 -3
  42. package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
  43. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +10 -0
  44. package/dist/components/Common/UI/Alert/AlertTypes.js +7 -0
  45. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -0
  46. package/dist/components/Common/UI/Badge/Badge.js +10 -10
  47. package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
  48. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
  49. package/dist/components/Common/UI/Badge/BadgeTypes.js +7 -0
  50. package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -0
  51. package/dist/components/Common/UI/Button/Button.d.ts +1 -1
  52. package/dist/components/Common/UI/Button/Button.js +30 -27
  53. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  54. package/dist/components/Common/UI/Button/ButtonIcon.js +6 -6
  55. package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
  56. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +17 -0
  57. package/dist/components/Common/UI/Button/ButtonTypes.js +14 -0
  58. package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -0
  59. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +1 -1
  60. package/dist/components/Common/UI/Checkbox/Checkbox.d.ts +1 -1
  61. package/dist/components/Common/UI/Checkbox/Checkbox.js +51 -49
  62. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  63. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +7 -0
  64. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js +8 -0
  65. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -0
  66. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  67. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +72 -69
  68. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
  69. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +9 -0
  70. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js +10 -0
  71. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -0
  72. package/dist/components/Common/UI/DatePicker/DatePicker.js +1 -1
  73. package/dist/components/Common/UI/Input/Input.d.ts +1 -1
  74. package/dist/components/Common/UI/Input/Input.js +38 -27
  75. package/dist/components/Common/UI/Input/Input.js.map +1 -1
  76. package/dist/components/Common/UI/Input/InputTypes.d.ts +7 -0
  77. package/dist/components/Common/UI/Input/InputTypes.js +7 -0
  78. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -0
  79. package/dist/components/Common/UI/Menu/Menu.d.ts +1 -1
  80. package/dist/components/Common/UI/Menu/Menu.js +32 -30
  81. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  82. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +6 -0
  83. package/dist/components/Common/UI/Menu/MenuTypes.js +7 -0
  84. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -0
  85. package/dist/components/Common/UI/Radio/Radio.d.ts +1 -1
  86. package/dist/components/Common/UI/Radio/Radio.js +50 -48
  87. package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
  88. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +7 -0
  89. package/dist/components/Common/UI/Radio/RadioTypes.js +8 -0
  90. package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -0
  91. package/dist/components/Common/UI/RadioGroup/RadioGroup.d.ts +1 -1
  92. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +61 -58
  93. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  94. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +9 -0
  95. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js +10 -0
  96. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -0
  97. package/dist/components/Common/UI/Switch/Switch.d.ts +1 -1
  98. package/dist/components/Common/UI/Switch/Switch.js +48 -46
  99. package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
  100. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +7 -0
  101. package/dist/components/Common/UI/Switch/SwitchTypes.js +8 -0
  102. package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -0
  103. package/dist/components/Common/UI/Table/Table.d.ts +1 -1
  104. package/dist/components/Common/UI/Table/Table.js +10 -7
  105. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  106. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  107. package/dist/components/Common/UI/Table/TableTypes.d.ts +4 -0
  108. package/dist/components/Common/UI/Tabs/Tabs.d.ts +7 -0
  109. package/dist/components/Common/UI/Tabs/Tabs.js +25 -0
  110. package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -0
  111. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +8 -0
  112. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js.map +1 -0
  113. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +51 -0
  114. package/dist/components/Common/UI/Tabs/index.d.ts +3 -0
  115. package/dist/components/Common/UI/Text/Text.d.ts +1 -1
  116. package/dist/components/Common/UI/Text/Text.js +22 -25
  117. package/dist/components/Common/UI/Text/Text.js.map +1 -1
  118. package/dist/components/Common/UI/Text/TextTypes.d.ts +7 -0
  119. package/dist/components/Common/UI/Text/TextTypes.js +8 -0
  120. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -0
  121. package/dist/components/Common/UI/TextInput/TextInput.d.ts +1 -1
  122. package/dist/components/Common/UI/TextInput/TextInput.js +53 -51
  123. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  124. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +9 -0
  125. package/dist/components/Common/UI/TextInput/TextInputTypes.js +9 -0
  126. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -0
  127. package/dist/components/Common/hooks/useNumberFormatter.js +1 -1
  128. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
  129. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  130. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  131. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  132. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
  133. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  134. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -8
  135. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  136. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  137. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  138. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +7 -5
  139. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  140. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
  141. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  142. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +9 -10
  143. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  144. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
  145. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  146. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +7 -5
  147. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  148. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  149. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  150. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +9 -7
  151. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  152. package/dist/components/Company/BankAccount/BankAccount.js +1 -1
  153. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  154. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  155. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +2 -2
  156. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  157. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  158. package/dist/components/Company/BankAccount/BankAccountForm/context.js +7 -5
  159. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  160. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
  161. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  162. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
  163. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
  164. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  165. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +2 -2
  166. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  167. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  168. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
  169. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  170. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +12 -14
  171. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  172. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +7 -5
  173. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  174. package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
  175. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -11
  176. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  177. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +7 -5
  178. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  179. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  180. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  181. package/dist/components/Company/FederalTaxes/FederalTaxes.js +18 -20
  182. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  183. package/dist/components/Company/FederalTaxes/Form.js +4 -6
  184. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  185. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -8
  186. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  187. package/dist/components/Company/Industry/Actions.js +5 -7
  188. package/dist/components/Company/Industry/Actions.js.map +1 -1
  189. package/dist/components/Company/Industry/Context.js +10 -8
  190. package/dist/components/Company/Industry/Context.js.map +1 -1
  191. package/dist/components/Company/Industry/Edit.js +10 -12
  192. package/dist/components/Company/Industry/Edit.js.map +1 -1
  193. package/dist/components/Company/Industry/Industry.js +2 -2
  194. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
  195. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  196. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  197. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  198. package/dist/components/Company/Locations/LocationForm/LocationForm.js +14 -16
  199. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  200. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +7 -5
  201. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  202. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  203. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  204. package/dist/components/Company/Locations/LocationsList/List.js +2 -4
  205. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  206. package/dist/components/Company/Locations/LocationsList/LocationsList.js +13 -15
  207. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  208. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +7 -5
  209. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  210. package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
  211. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  212. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
  213. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  214. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -5
  215. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  216. package/dist/components/Company/OnboardingOverview/context.js +7 -5
  217. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  218. package/dist/components/Company/PaySchedule/PaySchedule.js +38 -40
  219. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  220. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -12
  221. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  222. package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
  223. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  224. package/dist/components/Company/PaySchedule/_parts/Head.js +6 -8
  225. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  226. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  227. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  228. package/dist/components/Company/PaySchedule/usePaySchedule.js +10 -8
  229. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  230. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
  231. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  232. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +3 -3
  233. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +7 -5
  234. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  235. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
  236. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  237. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
  238. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  239. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
  240. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +7 -5
  241. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  242. package/dist/components/Contractor/Address/Address.js +8 -10
  243. package/dist/components/Contractor/Address/Address.js.map +1 -1
  244. package/dist/components/Contractor/Address/Form.js +3 -4
  245. package/dist/components/Contractor/Address/Form.js.map +1 -1
  246. package/dist/components/Contractor/Address/useAddress.js +9 -7
  247. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  248. package/dist/components/Contractor/ContractorList/index.js +25 -26
  249. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  250. package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
  251. package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
  252. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  253. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -7
  254. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  255. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +9 -10
  256. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  257. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  258. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  259. package/dist/components/Contractor/Profile/ContractorProfile.js +1 -1
  260. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  261. package/dist/components/Contractor/Profile/useContractorProfile.js +38 -35
  262. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  263. package/dist/components/Contractor/Submit/Submit.js +6 -7
  264. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  265. package/dist/components/Employee/Compensation/Actions.js +5 -6
  266. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  267. package/dist/components/Employee/Compensation/Compensation.js +10 -10
  268. package/dist/components/Employee/Compensation/Edit.js +14 -15
  269. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  270. package/dist/components/Employee/Compensation/List.js +23 -25
  271. package/dist/components/Employee/Compensation/List.js.map +1 -1
  272. package/dist/components/Employee/Deductions/Deductions.js +1 -1
  273. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +14 -15
  274. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  275. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +9 -10
  276. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  277. package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +6 -0
  278. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +11 -12
  279. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  280. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  281. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  282. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -12
  283. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  284. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  285. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  286. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +7 -5
  287. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  288. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +14 -16
  289. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  290. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +7 -5
  291. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  292. package/dist/components/Employee/EmployeeList/Actions.js +4 -6
  293. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  294. package/dist/components/Employee/EmployeeList/EmployeeList.js +7 -8
  295. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  296. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  297. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  298. package/dist/components/Employee/EmployeeList/List.js +14 -15
  299. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  300. package/dist/components/Employee/EmployeeList/useEmployeeList.js +7 -5
  301. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  302. package/dist/components/Employee/FederalTaxes/Actions.js +6 -8
  303. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  304. package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -13
  305. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  306. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +3 -3
  307. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +7 -5
  308. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  309. package/dist/components/Employee/Landing/Landing.js +14 -15
  310. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  311. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +9 -9
  312. package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
  313. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  314. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
  315. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  316. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -10
  317. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  318. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +8 -8
  319. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
  320. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  321. package/dist/components/Employee/PaymentMethod/Split.js +11 -12
  322. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  323. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +13 -11
  324. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  325. package/dist/components/Employee/Profile/Actions.js +7 -9
  326. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  327. package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
  328. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  329. package/dist/components/Employee/Profile/HomeAddress.js +5 -6
  330. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  331. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
  332. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  333. package/dist/components/Employee/Profile/Profile.js +13 -13
  334. package/dist/components/Employee/Profile/useProfile.js +7 -5
  335. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  336. package/dist/components/Employee/StateTaxes/Actions.js +8 -10
  337. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  338. package/dist/components/Employee/StateTaxes/StateTaxes.js +3 -3
  339. package/dist/components/Employee/StateTaxes/useStateTaxes.js +7 -5
  340. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  341. package/dist/components/Employee/Taxes/Actions.js +8 -10
  342. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  343. package/dist/components/Employee/Taxes/FederalForm.js +12 -14
  344. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  345. package/dist/components/Employee/Taxes/Taxes.js +5 -5
  346. package/dist/components/Employee/Taxes/useTaxes.js +7 -5
  347. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  348. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +3 -1
  349. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +57 -67
  350. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  351. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  352. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +85 -88
  353. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  354. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +5 -2
  355. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +67 -13
  356. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  357. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +18 -2
  358. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +117 -19
  359. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  360. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +18 -0
  361. package/dist/components/Payroll/PayrollList/PayrollList.js +25 -19
  362. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  363. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +5 -1
  364. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +67 -33
  365. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  366. package/dist/components/Payroll/PayrollList/types.d.ts +1 -0
  367. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +3 -2
  368. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +50 -26
  369. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  370. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +7 -1
  371. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +269 -49
  372. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  373. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +8 -2
  374. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +78 -22
  375. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
  376. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +11 -9
  377. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -1
  378. package/dist/components/Payroll/helpers.d.ts +7 -6
  379. package/dist/components/Payroll/helpers.js +44 -43
  380. package/dist/components/Payroll/helpers.js.map +1 -1
  381. package/dist/components/Payroll/usePreparedPayrollData.d.ts +14 -0
  382. package/dist/components/Payroll/usePreparedPayrollData.js +39 -0
  383. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -0
  384. package/dist/contexts/ApiProvider/ApiProvider.js +4 -4
  385. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +28 -26
  386. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  387. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +68 -0
  388. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +53 -0
  389. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -0
  390. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  391. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  392. package/dist/contexts/GustoProvider/GustoProvider.js +17 -12
  393. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  394. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -10
  395. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  396. package/dist/helpers/applyMissingDefaults.d.ts +5 -0
  397. package/dist/helpers/applyMissingDefaults.js +10 -0
  398. package/dist/helpers/applyMissingDefaults.js.map +1 -0
  399. package/dist/helpers/formattedStrings.js +11 -12
  400. package/dist/helpers/formattedStrings.js.map +1 -1
  401. package/dist/i18n/I18n.js +5 -5
  402. package/dist/i18n/I18n.js.map +1 -1
  403. package/dist/i18n/en/Employee.Deductions.json.js +68 -60
  404. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  405. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +20 -18
  406. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  407. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -0
  408. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -0
  409. package/dist/i18n/en/Payroll.PayrollList.json.js +12 -10
  410. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  411. package/dist/i18n/en/Payroll.PayrollOverview.json.js +26 -0
  412. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -0
  413. package/dist/i18n/en/Payroll.RunPayroll.json.js +8 -0
  414. package/dist/i18n/en/Payroll.RunPayroll.json.js.map +1 -0
  415. package/dist/i18n/en/payroll.payrollhistory.json.js +20 -0
  416. package/dist/i18n/en/payroll.payrollhistory.json.js.map +1 -0
  417. package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js +40 -0
  418. package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js.map +1 -0
  419. package/dist/node_modules/@react-dnd/asap/dist/RawTask.js +18 -0
  420. package/dist/node_modules/@react-dnd/asap/dist/RawTask.js.map +1 -0
  421. package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js +17 -0
  422. package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js.map +1 -0
  423. package/dist/node_modules/@react-dnd/asap/dist/asap.js +10 -0
  424. package/dist/node_modules/@react-dnd/asap/dist/asap.js.map +1 -0
  425. package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js +63 -0
  426. package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js.map +1 -0
  427. package/dist/node_modules/@react-dnd/invariant/dist/index.js +23 -0
  428. package/dist/node_modules/@react-dnd/invariant/dist/index.js.map +1 -0
  429. package/dist/node_modules/@react-dnd/shallowequal/dist/index.js +26 -0
  430. package/dist/node_modules/@react-dnd/shallowequal/dist/index.js.map +1 -0
  431. package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js +71 -0
  432. package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js.map +1 -0
  433. package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js +55 -0
  434. package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js.map +1 -0
  435. package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js +19 -0
  436. package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js.map +1 -0
  437. package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js +43 -0
  438. package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js.map +1 -0
  439. package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js +18 -0
  440. package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js.map +1 -0
  441. package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js +14 -0
  442. package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js.map +1 -0
  443. package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js +13 -0
  444. package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js.map +1 -0
  445. package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js +10 -0
  446. package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js.map +1 -0
  447. package/dist/node_modules/dnd-core/dist/actions/registry.js +44 -0
  448. package/dist/node_modules/dnd-core/dist/actions/registry.js.map +1 -0
  449. package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js +42 -0
  450. package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js.map +1 -0
  451. package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js +116 -0
  452. package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js.map +1 -0
  453. package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js +97 -0
  454. package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js.map +1 -0
  455. package/dist/node_modules/dnd-core/dist/contracts.js +22 -0
  456. package/dist/node_modules/dnd-core/dist/contracts.js.map +1 -0
  457. package/dist/node_modules/dnd-core/dist/createDragDropManager.js +20 -0
  458. package/dist/node_modules/dnd-core/dist/createDragDropManager.js.map +1 -0
  459. package/dist/node_modules/dnd-core/dist/interfaces.js +8 -0
  460. package/dist/node_modules/dnd-core/dist/interfaces.js.map +1 -0
  461. package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js +31 -0
  462. package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js.map +1 -0
  463. package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js +51 -0
  464. package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js.map +1 -0
  465. package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js +79 -0
  466. package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js.map +1 -0
  467. package/dist/node_modules/dnd-core/dist/reducers/index.js +43 -0
  468. package/dist/node_modules/dnd-core/dist/reducers/index.js.map +1 -0
  469. package/dist/node_modules/dnd-core/dist/reducers/refCount.js +17 -0
  470. package/dist/node_modules/dnd-core/dist/reducers/refCount.js.map +1 -0
  471. package/dist/node_modules/dnd-core/dist/reducers/stateId.js +7 -0
  472. package/dist/node_modules/dnd-core/dist/reducers/stateId.js.map +1 -0
  473. package/dist/node_modules/dnd-core/dist/utils/coords.js +27 -0
  474. package/dist/node_modules/dnd-core/dist/utils/coords.js.map +1 -0
  475. package/dist/node_modules/dnd-core/dist/utils/dirtiness.js +13 -0
  476. package/dist/node_modules/dnd-core/dist/utils/dirtiness.js.map +1 -0
  477. package/dist/node_modules/dnd-core/dist/utils/equality.js +18 -0
  478. package/dist/node_modules/dnd-core/dist/utils/equality.js.map +1 -0
  479. package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js +8 -0
  480. package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js.map +1 -0
  481. package/dist/node_modules/dnd-core/dist/utils/js_utils.js +37 -0
  482. package/dist/node_modules/dnd-core/dist/utils/js_utils.js.map +1 -0
  483. package/dist/node_modules/dnd-core/dist/utils/matchesType.js +9 -0
  484. package/dist/node_modules/dnd-core/dist/utils/matchesType.js.map +1 -0
  485. package/dist/node_modules/fast-deep-equal/index.js +32 -0
  486. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  487. package/dist/node_modules/react-dnd/dist/core/DndContext.js +8 -0
  488. package/dist/node_modules/react-dnd/dist/core/DndContext.js.map +1 -0
  489. package/dist/node_modules/react-dnd/dist/core/DndProvider.js +67 -0
  490. package/dist/node_modules/react-dnd/dist/core/DndProvider.js.map +1 -0
  491. package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js +12 -0
  492. package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js.map +1 -0
  493. package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +23 -0
  494. package/dist/node_modules/react-dnd/dist/hooks/useCollector.js.map +1 -0
  495. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +26 -0
  496. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js.map +1 -0
  497. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +22 -0
  498. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js.map +1 -0
  499. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +21 -0
  500. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js.map +1 -0
  501. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +20 -0
  502. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js.map +1 -0
  503. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +23 -0
  504. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js.map +1 -0
  505. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +16 -0
  506. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js.map +1 -0
  507. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +14 -0
  508. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js.map +1 -0
  509. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +24 -0
  510. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js.map +1 -0
  511. package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js +11 -0
  512. package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js.map +1 -0
  513. package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js +22 -0
  514. package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js.map +1 -0
  515. package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js +13 -0
  516. package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js.map +1 -0
  517. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js +14 -0
  518. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js.map +1 -0
  519. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js +17 -0
  520. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js.map +1 -0
  521. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js +19 -0
  522. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js.map +1 -0
  523. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js +19 -0
  524. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js.map +1 -0
  525. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js +16 -0
  526. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js.map +1 -0
  527. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js +24 -0
  528. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js.map +1 -0
  529. package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js +6 -0
  530. package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  531. package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js +21 -0
  532. package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js.map +1 -0
  533. package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js +11 -0
  534. package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js.map +1 -0
  535. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +89 -0
  536. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js.map +1 -0
  537. package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js +60 -0
  538. package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js.map +1 -0
  539. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +88 -0
  540. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js.map +1 -0
  541. package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js +58 -0
  542. package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js.map +1 -0
  543. package/dist/node_modules/react-dnd/dist/internals/isRef.js +10 -0
  544. package/dist/node_modules/react-dnd/dist/internals/isRef.js.map +1 -0
  545. package/dist/node_modules/react-dnd/dist/internals/registration.js +19 -0
  546. package/dist/node_modules/react-dnd/dist/internals/registration.js.map +1 -0
  547. package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js +47 -0
  548. package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js.map +1 -0
  549. package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js +11 -0
  550. package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js.map +1 -0
  551. package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js +23 -0
  552. package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js.map +1 -0
  553. package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js +275 -0
  554. package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js.map +1 -0
  555. package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js +60 -0
  556. package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js.map +1 -0
  557. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js +44 -0
  558. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js.map +1 -0
  559. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js +11 -0
  560. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js.map +1 -0
  561. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js +25 -0
  562. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js.map +1 -0
  563. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js +49 -0
  564. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js.map +1 -0
  565. package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js +8 -0
  566. package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js.map +1 -0
  567. package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js +71 -0
  568. package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js.map +1 -0
  569. package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js +23 -0
  570. package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js.map +1 -0
  571. package/dist/node_modules/react-dnd-html5-backend/dist/index.js +8 -0
  572. package/dist/node_modules/react-dnd-html5-backend/dist/index.js.map +1 -0
  573. package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js +23 -0
  574. package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js.map +1 -0
  575. package/dist/node_modules/redux/es/redux.js +159 -0
  576. package/dist/node_modules/redux/es/redux.js.map +1 -0
  577. package/dist/shared/constants.d.ts +15 -0
  578. package/dist/shared/constants.js +49 -34
  579. package/dist/shared/constants.js.map +1 -1
  580. package/dist/style.css +1 -1
  581. package/dist/types/i18next.d.ts +129 -1
  582. package/package.json +17 -15
@@ -1 +1 @@
1
- {"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,MAAMA,IAA2C;AAAA,EACtD,OAAO,CAACC,MAAsB,gBAAAC,EAACC,GAAA,EAAO,GAAGF,GAAO;AAAA,EAChD,OAAO,CAACA,MAAsB,gBAAAC,EAACE,GAAA,EAAO,GAAGH,GAAO;AAAA,EAChD,QAAQ,CAACA,MAAuB,gBAAAC,EAACG,GAAA,EAAQ,GAAGJ,GAAO;AAAA,EACnD,YAAY,CAACA,MAA2B,gBAAAC,EAACI,GAAA,EAAY,GAAGL,GAAO;AAAA,EAC/D,MAAM,CAACA,MAAqB,gBAAAC,EAACK,GAAA,EAAM,GAAGN,GAAO;AAAA,EAC7C,WAAW,CAACA,MAA0B,gBAAAC,EAACM,GAAA,EAAW,GAAGP,GAAO;AAAA,EAC5D,UAAU,CAACA,MAAyB,gBAAAC,EAACO,GAAA,EAAU,GAAGR,GAAO;AAAA,EACzD,eAAe,CAACA,MAA8B,gBAAAC,EAACQ,GAAA,EAAe,GAAGT,GAAO;AAAA,EACxE,UAAU,CAACA,MAAyB,gBAAAC,EAACS,GAAA,EAAU,GAAGV,GAAO;AAAA,EACzD,YAAY,CAACA,MAA2B,gBAAAC,EAACU,GAAA,EAAY,GAAGX,GAAO;AAAA,EAC/D,aAAa,CAACA,MAA4B,gBAAAC,EAACW,GAAA,EAAa,GAAGZ,GAAO;AAAA,EAClE,eAAe,CAACA,MAA8B,gBAAAC,EAACY,GAAA,EAAe,GAAGb,GAAO;AAAA,EACxE,aAAa,CAACA,MAA4B,gBAAAC,EAACa,GAAA,EAAa,GAAGd,GAAO;AAAA,EAClE,OAAO,CAACA,MAAsB,gBAAAC,EAACc,GAAA,EAAO,GAAGf,GAAO;AAAA,EAChD,YAAY,CAACA,MAA2B,gBAAAC,EAACe,GAAA,EAAY,GAAGhB,GAAO;AAAA,EAC/D,QAAQ,CAACA,MAAuB,gBAAAC,EAACgB,GAAA,EAAQ,GAAGjB,GAAO;AAAA,EACnD,QAAQ,CAACA,MAAuB,gBAAAC,EAACiB,GAAA,EAAQ,GAAGlB,GAAO;AAAA,EACnD,MAAM,CAACA,MAAqB,gBAAAC,EAACkB,GAAA,EAAM,GAAGnB,GAAO;AAAA,EAC7C,MAAM,CAACA,MAAqB,gBAAAC,EAACmB,GAAA,EAAM,GAAGpB,GAAO;AAAA,EAC7C,OAAO,CAACA,MAAsB,gBAAAC,EAACoB,GAAA,EAAO,GAAGrB,GAAO;AAAA,EAChD,SAAS,CAACA,MAAwB,gBAAAC,EAACqB,GAAA,EAAS,GAAGtB,GAAO;AAAA,EACtD,MAAM,CAACA,MAAqB,gBAAAC,EAACsB,GAAA,EAAM,GAAGvB,GAAO;AAAA,EAC7C,iBAAiB,CAACA,MAAgC,gBAAAC,EAACuB,GAAA,EAAiB,GAAGxB,GAAO;AAAA,EAC9E,aAAa,CAACA,MAA4B,gBAAAC,EAACwB,GAAA,EAAa,GAAGzB,EAAA,CAAO;AACpE;"}
1
+ {"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport { Tabs } from '@/components/Common/UI/Tabs'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Tabs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqDO,MAAMA,IAA2C;AAAA,EACtD,OAAO,CAACC,MAAsB,gBAAAC,EAACC,GAAA,EAAO,GAAGF,GAAO;AAAA,EAChD,OAAO,CAACA,MAAsB,gBAAAC,EAACE,GAAA,EAAO,GAAGH,GAAO;AAAA,EAChD,QAAQ,CAACA,MAAuB,gBAAAC,EAACG,GAAA,EAAQ,GAAGJ,GAAO;AAAA,EACnD,YAAY,CAACA,MAA2B,gBAAAC,EAACI,GAAA,EAAY,GAAGL,GAAO;AAAA,EAC/D,MAAM,CAACA,MAAqB,gBAAAC,EAACK,GAAA,EAAM,GAAGN,GAAO;AAAA,EAC7C,WAAW,CAACA,MAA0B,gBAAAC,EAACM,GAAA,EAAW,GAAGP,GAAO;AAAA,EAC5D,UAAU,CAACA,MAAyB,gBAAAC,EAACO,GAAA,EAAU,GAAGR,GAAO;AAAA,EACzD,eAAe,CAACA,MAA8B,gBAAAC,EAACQ,GAAA,EAAe,GAAGT,GAAO;AAAA,EACxE,UAAU,CAACA,MAAyB,gBAAAC,EAACS,GAAA,EAAU,GAAGV,GAAO;AAAA,EACzD,YAAY,CAACA,MAA2B,gBAAAC,EAACU,GAAA,EAAY,GAAGX,GAAO;AAAA,EAC/D,aAAa,CAACA,MAA4B,gBAAAC,EAACW,GAAA,EAAa,GAAGZ,GAAO;AAAA,EAClE,eAAe,CAACA,MAA8B,gBAAAC,EAACY,GAAA,EAAe,GAAGb,GAAO;AAAA,EACxE,aAAa,CAACA,MAA4B,gBAAAC,EAACa,GAAA,EAAa,GAAGd,GAAO;AAAA,EAClE,OAAO,CAACA,MAAsB,gBAAAC,EAACc,GAAA,EAAO,GAAGf,GAAO;AAAA,EAChD,YAAY,CAACA,MAA2B,gBAAAC,EAACe,GAAA,EAAY,GAAGhB,GAAO;AAAA,EAC/D,QAAQ,CAACA,MAAuB,gBAAAC,EAACgB,GAAA,EAAQ,GAAGjB,GAAO;AAAA,EACnD,QAAQ,CAACA,MAAuB,gBAAAC,EAACiB,GAAA,EAAQ,GAAGlB,GAAO;AAAA,EACnD,MAAM,CAACA,MAAqB,gBAAAC,EAACkB,GAAA,EAAM,GAAGnB,GAAO;AAAA,EAC7C,MAAM,CAACA,MAAqB,gBAAAC,EAACmB,GAAA,EAAM,GAAGpB,GAAO;AAAA,EAC7C,OAAO,CAACA,MAAsB,gBAAAC,EAACoB,GAAA,EAAO,GAAGrB,GAAO;AAAA,EAChD,SAAS,CAACA,MAAwB,gBAAAC,EAACqB,GAAA,EAAS,GAAGtB,GAAO;AAAA,EACtD,MAAM,CAACA,MAAqB,gBAAAC,EAACsB,GAAA,EAAM,GAAGvB,GAAO;AAAA,EAC7C,iBAAiB,CAACA,MAAgC,gBAAAC,EAACuB,GAAA,EAAiB,GAAGxB,GAAO;AAAA,EAC9E,aAAa,CAACA,MAA4B,gBAAAC,EAACwB,GAAA,EAAa,GAAGzB,GAAO;AAAA,EAClE,MAAM,CAACA,MAAqB,gBAAAC,EAACyB,GAAA,EAAM,GAAG1B,EAAA,CAAO;AAC/C;"}
@@ -0,0 +1,68 @@
1
+ import { default as React } from 'react';
2
+ import { ComponentsContextType } from './useComponentContext';
3
+ import { AlertProps } from '../../components/Common/UI/Alert/AlertTypes';
4
+ import { BadgeProps } from '../../components/Common/UI/Badge/BadgeTypes';
5
+ import { ButtonProps, ButtonIconProps } from '../../components/Common/UI/Button/ButtonTypes';
6
+ import { CheckboxProps } from '../../components/Common/UI/Checkbox/CheckboxTypes';
7
+ import { CheckboxGroupProps } from '../../components/Common/UI/CheckboxGroup/CheckboxGroupTypes';
8
+ import { MenuProps } from '../../components/Common/UI/Menu/MenuTypes';
9
+ import { RadioProps } from '../../components/Common/UI/Radio/RadioTypes';
10
+ import { RadioGroupProps } from '../../components/Common/UI/RadioGroup/RadioGroupTypes';
11
+ import { SwitchProps } from '../../components/Common/UI/Switch/SwitchTypes';
12
+ import { TextProps } from '../../components/Common/UI/Text/TextTypes';
13
+ import { TextInputProps } from '../../components/Common/UI/TextInput/TextInputTypes';
14
+ export declare const componentCreators: {
15
+ readonly Alert: (customComponent: (props: AlertProps) => React.ReactElement | null) => {
16
+ (props: AlertProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
17
+ displayName: string;
18
+ };
19
+ readonly Badge: (customComponent: (props: BadgeProps) => React.ReactElement | null) => {
20
+ (props: BadgeProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
21
+ displayName: string;
22
+ };
23
+ readonly Button: (customComponent: (props: ButtonProps) => React.ReactElement | null) => {
24
+ (props: ButtonProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
25
+ displayName: string;
26
+ };
27
+ readonly ButtonIcon: (customComponent: (props: ButtonIconProps) => React.ReactElement | null) => {
28
+ (props: ButtonIconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
29
+ displayName: string;
30
+ };
31
+ readonly Checkbox: (customComponent: (props: CheckboxProps) => React.ReactElement | null) => {
32
+ (props: CheckboxProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
33
+ displayName: string;
34
+ };
35
+ readonly CheckboxGroup: (customComponent: (props: CheckboxGroupProps) => React.ReactElement | null) => {
36
+ (props: CheckboxGroupProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
37
+ displayName: string;
38
+ };
39
+ readonly Menu: (customComponent: (props: MenuProps) => React.ReactElement | null) => {
40
+ (props: MenuProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
41
+ displayName: string;
42
+ };
43
+ readonly Radio: (customComponent: (props: RadioProps) => React.ReactElement | null) => {
44
+ (props: RadioProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
45
+ displayName: string;
46
+ };
47
+ readonly RadioGroup: (customComponent: (props: RadioGroupProps) => React.ReactElement | null) => {
48
+ (props: RadioGroupProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
49
+ displayName: string;
50
+ };
51
+ readonly Switch: (customComponent: (props: SwitchProps) => React.ReactElement | null) => {
52
+ (props: SwitchProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
53
+ displayName: string;
54
+ };
55
+ readonly Text: (customComponent: (props: TextProps) => React.ReactElement | null) => {
56
+ (props: TextProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
57
+ displayName: string;
58
+ };
59
+ readonly TextInput: (customComponent: (props: TextInputProps) => React.ReactElement | null) => {
60
+ (props: TextInputProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
61
+ displayName: string;
62
+ };
63
+ };
64
+ /**
65
+ * Creates components with automatic default prop handling.
66
+ * Supports both partial (GustoProvider) and full (GustoProviderCustomUIAdapter) component sets.
67
+ */
68
+ export declare function createComponents(providedComponents?: Partial<ComponentsContextType>): ComponentsContextType;
@@ -0,0 +1,53 @@
1
+ import { defaultComponents as f } from "./adapters/defaultComponentAdapter.js";
2
+ import { applyMissingDefaults as i } from "../../helpers/applyMissingDefaults.js";
3
+ import { AlertDefaults as s } from "../../components/Common/UI/Alert/AlertTypes.js";
4
+ import { BadgeDefaults as c } from "../../components/Common/UI/Badge/BadgeTypes.js";
5
+ import { ButtonIconDefaults as l, ButtonDefaults as D } from "../../components/Common/UI/Button/ButtonTypes.js";
6
+ import { CheckboxDefaults as d } from "../../components/Common/UI/Checkbox/CheckboxTypes.js";
7
+ import { CheckboxGroupDefaults as x } from "../../components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js";
8
+ import { MenuDefaults as h } from "../../components/Common/UI/Menu/MenuTypes.js";
9
+ import { RadioDefaults as C } from "../../components/Common/UI/Radio/RadioTypes.js";
10
+ import { RadioGroupDefaults as B } from "../../components/Common/UI/RadioGroup/RadioGroupTypes.js";
11
+ import { SwitchDefaults as b } from "../../components/Common/UI/Switch/SwitchTypes.js";
12
+ import { TextDefaults as k } from "../../components/Common/UI/Text/TextTypes.js";
13
+ import { TextInputDefaults as G } from "../../components/Common/UI/TextInput/TextInputTypes.js";
14
+ function t(u, o) {
15
+ return (e) => {
16
+ const r = (n) => {
17
+ const p = i(n, u);
18
+ return e(p);
19
+ };
20
+ return r.displayName = `withAutoDefault(${o})`, r;
21
+ };
22
+ }
23
+ const m = {
24
+ Alert: t(s, "Alert"),
25
+ Badge: t(c, "Badge"),
26
+ Button: t(D, "Button"),
27
+ ButtonIcon: t(l, "ButtonIcon"),
28
+ Checkbox: t(d, "Checkbox"),
29
+ CheckboxGroup: t(x, "CheckboxGroup"),
30
+ Menu: t(h, "Menu"),
31
+ Radio: t(C, "Radio"),
32
+ RadioGroup: t(B, "RadioGroup"),
33
+ Switch: t(b, "Switch"),
34
+ Text: t(k, "Text"),
35
+ TextInput: t(G, "TextInput")
36
+ };
37
+ function v(u = {}) {
38
+ const o = { ...f };
39
+ for (const [e, r] of Object.entries(u)) {
40
+ const n = e;
41
+ if (e in m) {
42
+ const a = m[e];
43
+ o[n] = a(r);
44
+ } else
45
+ o[n] = r;
46
+ }
47
+ return o;
48
+ }
49
+ export {
50
+ m as componentCreators,
51
+ v as createComponents
52
+ };
53
+ //# sourceMappingURL=createComponentsWithDefaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createComponentsWithDefaults.js","sources":["../../../src/contexts/ComponentAdapter/createComponentsWithDefaults.ts"],"sourcesContent":["import type React from 'react'\nimport type { ComponentsContextType } from './useComponentContext'\nimport { defaultComponents } from './adapters/defaultComponentAdapter'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n// Import prop types and their defaults\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { AlertDefaults } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { BadgeDefaults } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { ButtonDefaults, ButtonIconDefaults } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { CheckboxDefaults } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroupDefaults } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { MenuDefaults } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { RadioDefaults } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroupDefaults } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { SwitchDefaults } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { TextDefaults } from '@/components/Common/UI/Text/TextTypes'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInputDefaults } from '@/components/Common/UI/TextInput/TextInputTypes'\n\nfunction composeWithDefaults<TProps>(defaults: Partial<TProps>, componentName: string) {\n return (customComponent: (props: TProps) => React.ReactElement | null) => {\n const wrappedComponent = (props: TProps) => {\n const propsWithDefaults = applyMissingDefaults(props, defaults)\n return customComponent(propsWithDefaults)\n }\n wrappedComponent.displayName = `withAutoDefault(${componentName})`\n return wrappedComponent\n }\n}\n\n// Component creators with defaults\nexport const componentCreators = {\n Alert: composeWithDefaults<AlertProps>(AlertDefaults, 'Alert'),\n Badge: composeWithDefaults<BadgeProps>(BadgeDefaults, 'Badge'),\n Button: composeWithDefaults<ButtonProps>(ButtonDefaults, 'Button'),\n ButtonIcon: composeWithDefaults<ButtonIconProps>(ButtonIconDefaults, 'ButtonIcon'),\n Checkbox: composeWithDefaults<CheckboxProps>(CheckboxDefaults, 'Checkbox'),\n CheckboxGroup: composeWithDefaults<CheckboxGroupProps>(CheckboxGroupDefaults, 'CheckboxGroup'),\n Menu: composeWithDefaults<MenuProps>(MenuDefaults, 'Menu'),\n Radio: composeWithDefaults<RadioProps>(RadioDefaults, 'Radio'),\n RadioGroup: composeWithDefaults<RadioGroupProps>(RadioGroupDefaults, 'RadioGroup'),\n Switch: composeWithDefaults<SwitchProps>(SwitchDefaults, 'Switch'),\n Text: composeWithDefaults<TextProps>(TextDefaults, 'Text'),\n TextInput: composeWithDefaults<TextInputProps>(TextInputDefaults, 'TextInput'),\n} as const\n\n/**\n * Creates components with automatic default prop handling.\n * Supports both partial (GustoProvider) and full (GustoProviderCustomUIAdapter) component sets.\n */\nexport function createComponents(\n providedComponents: Partial<ComponentsContextType> = {},\n): ComponentsContextType {\n const components = { ...defaultComponents }\n\n for (const [componentName, providedComponent] of Object.entries(providedComponents)) {\n const typedComponentName = componentName as keyof ComponentsContextType\n\n if (componentName in componentCreators) {\n const creatorKey = componentName as keyof typeof componentCreators\n const creator = componentCreators[creatorKey]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = creator(providedComponent as any) as any\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = providedComponent as any\n }\n }\n\n return components\n}\n"],"names":["composeWithDefaults","defaults","componentName","customComponent","wrappedComponent","props","propsWithDefaults","applyMissingDefaults","componentCreators","AlertDefaults","BadgeDefaults","ButtonDefaults","ButtonIconDefaults","CheckboxDefaults","CheckboxGroupDefaults","MenuDefaults","RadioDefaults","RadioGroupDefaults","SwitchDefaults","TextDefaults","TextInputDefaults","createComponents","providedComponents","components","defaultComponents","providedComponent","typedComponentName","creator"],"mappings":";;;;;;;;;;;;;AA4BA,SAASA,EAA4BC,GAA2BC,GAAuB;AACrF,SAAO,CAACC,MAAkE;AACxE,UAAMC,IAAmB,CAACC,MAAkB;AAC1C,YAAMC,IAAoBC,EAAqBF,GAAOJ,CAAQ;AAC9D,aAAOE,EAAgBG,CAAiB;AAAA,IAC1C;AACA,WAAAF,EAAiB,cAAc,mBAAmBF,CAAa,KACxDE;AAAA,EACT;AACF;AAGO,MAAMI,IAAoB;AAAA,EAC/B,OAAOR,EAAgCS,GAAe,OAAO;AAAA,EAC7D,OAAOT,EAAgCU,GAAe,OAAO;AAAA,EAC7D,QAAQV,EAAiCW,GAAgB,QAAQ;AAAA,EACjE,YAAYX,EAAqCY,GAAoB,YAAY;AAAA,EACjF,UAAUZ,EAAmCa,GAAkB,UAAU;AAAA,EACzE,eAAeb,EAAwCc,GAAuB,eAAe;AAAA,EAC7F,MAAMd,EAA+Be,GAAc,MAAM;AAAA,EACzD,OAAOf,EAAgCgB,GAAe,OAAO;AAAA,EAC7D,YAAYhB,EAAqCiB,GAAoB,YAAY;AAAA,EACjF,QAAQjB,EAAiCkB,GAAgB,QAAQ;AAAA,EACjE,MAAMlB,EAA+BmB,GAAc,MAAM;AAAA,EACzD,WAAWnB,EAAoCoB,GAAmB,WAAW;AAC/E;AAMO,SAASC,EACdC,IAAqD,IAC9B;AACvB,QAAMC,IAAa,EAAE,GAAGC,EAAA;AAExB,aAAW,CAACtB,GAAeuB,CAAiB,KAAK,OAAO,QAAQH,CAAkB,GAAG;AACnF,UAAMI,IAAqBxB;AAE3B,QAAIA,KAAiBM,GAAmB;AAEtC,YAAMmB,IAAUnB,EADGN,CACyB;AAE5C,MAAAqB,EAAWG,CAAkB,IAAIC,EAAQF,CAAwB;AAAA,IACnE;AAEE,MAAAF,EAAWG,CAAkB,IAAID;AAAA,EAErC;AAEA,SAAOF;AACT;"}
@@ -22,6 +22,7 @@ import { PaginationControlProps } from '../../components/Common/PaginationContro
22
22
  import { TextProps } from '../../components/Common/UI/Text/TextTypes';
23
23
  import { CalendarPreviewProps } from '../../components/Common/UI/CalendarPreview/CalendarPreviewTypes';
24
24
  import { ProgressBarProps } from '../../components/Common/UI/ProgressBar/ProgressBarTypes';
25
+ import { TabsProps } from '../../components/Common/UI/Tabs/TabsTypes';
25
26
  export interface ComponentsContextType {
26
27
  Alert: (props: AlertProps) => JSX.Element | null;
27
28
  Badge: (props: BadgeProps) => JSX.Element | null;
@@ -48,6 +49,7 @@ export interface ComponentsContextType {
48
49
  Text: (props: TextProps) => JSX.Element | null;
49
50
  CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null;
50
51
  ProgressBar: (props: ProgressBarProps) => JSX.Element | null;
52
+ Tabs: (props: TabsProps) => JSX.Element | null;
51
53
  }
52
54
  export declare const ComponentsContext: import('react').Context<ComponentsContextType | null>;
53
55
  export declare const useComponentContext: () => ComponentsContextType;
@@ -1 +1 @@
1
- {"version":3,"file":"useComponentContext.js","sources":["../../../src/contexts/ComponentAdapter/useComponentContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { JSX } from 'react'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { ButtonIconProps, ButtonProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List/ListTypes'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar/ProgressBarTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Button: (props: ButtonProps) => JSX.Element | null\n ButtonIcon: (props: ButtonIconProps) => JSX.Element | null\n Card: (props: CardProps) => JSX.Element | null\n Checkbox: (props: CheckboxProps) => JSX.Element | null\n CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element | null\n ComboBox: (props: ComboBoxProps) => JSX.Element | null\n DatePicker: (props: DatePickerProps) => JSX.Element | null\n OrderedList: (props: OrderedListProps) => JSX.Element | null\n UnorderedList: (props: UnorderedListProps) => JSX.Element | null\n NumberInput: (props: NumberInputProps) => JSX.Element | null\n Radio: (props: RadioProps) => JSX.Element | null\n RadioGroup: (props: RadioGroupProps) => JSX.Element | null\n Select: (props: SelectProps) => JSX.Element | null\n Switch: (props: SwitchProps) => JSX.Element | null\n TextInput: (props: TextInputProps) => JSX.Element | null\n Link: (props: LinkProps) => JSX.Element | null\n Menu: (props: MenuProps) => JSX.Element | null\n Table: (props: TableProps) => JSX.Element | null\n Heading: (props: HeadingProps) => JSX.Element | null\n PaginationControl?: (props: PaginationControlProps) => JSX.Element | null\n Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n}\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":";AAsDO,MAAMA,IAAoBC,EAA4C,IAAI,GAEpEC,IAAsB,MAAM;AACvC,QAAMC,IAAUC,EAAWJ,CAAiB;AAC5C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8DAA8D;AAEhF,SAAOA;AACT;"}
1
+ {"version":3,"file":"useComponentContext.js","sources":["../../../src/contexts/ComponentAdapter/useComponentContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { JSX } from 'react'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { ButtonIconProps, ButtonProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List/ListTypes'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar/ProgressBarTypes'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Button: (props: ButtonProps) => JSX.Element | null\n ButtonIcon: (props: ButtonIconProps) => JSX.Element | null\n Card: (props: CardProps) => JSX.Element | null\n Checkbox: (props: CheckboxProps) => JSX.Element | null\n CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element | null\n ComboBox: (props: ComboBoxProps) => JSX.Element | null\n DatePicker: (props: DatePickerProps) => JSX.Element | null\n OrderedList: (props: OrderedListProps) => JSX.Element | null\n UnorderedList: (props: UnorderedListProps) => JSX.Element | null\n NumberInput: (props: NumberInputProps) => JSX.Element | null\n Radio: (props: RadioProps) => JSX.Element | null\n RadioGroup: (props: RadioGroupProps) => JSX.Element | null\n Select: (props: SelectProps) => JSX.Element | null\n Switch: (props: SwitchProps) => JSX.Element | null\n TextInput: (props: TextInputProps) => JSX.Element | null\n Link: (props: LinkProps) => JSX.Element | null\n Menu: (props: MenuProps) => JSX.Element | null\n Table: (props: TableProps) => JSX.Element | null\n Heading: (props: HeadingProps) => JSX.Element | null\n PaginationControl?: (props: PaginationControlProps) => JSX.Element | null\n Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n Tabs: (props: TabsProps) => JSX.Element | null\n}\n\nexport const ComponentsContext = createContext<ComponentsContextType | null>(null)\n\nexport const useComponentContext = () => {\n const context = useContext(ComponentsContext)\n if (!context) {\n throw new Error('useComponentContext must be used within a ComponentsProvider')\n }\n return context\n}\n"],"names":["ComponentsContext","createContext","useComponentContext","context","useContext"],"mappings":";AAwDO,MAAMA,IAAoBC,EAA4C,IAAI,GAEpEC,IAAsB,MAAM;AACvC,QAAMC,IAAUC,EAAWJ,CAAiB;AAC5C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8DAA8D;AAEhF,SAAOA;AACT;"}
@@ -1,16 +1,21 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { I18nProvider as i } from "react-aria-components";
3
- import { defaultComponents as p } from "../ComponentAdapter/adapters/defaultComponentAdapter.js";
4
- import { GustoProviderCustomUIAdapter as c } from "./GustoProviderCustomUIAdapter.js";
5
- const d = (t) => {
6
- const { children: e, components: n = {}, locale: o, ...m } = t, s = {
7
- ...p,
8
- ...n
9
- };
10
- return /* @__PURE__ */ r(c, { locale: o, ...m, components: s, children: /* @__PURE__ */ r(i, { locale: o, children: e }) });
11
- }, a = d;
2
+ import { I18nProvider as m } from "react-aria-components";
3
+ import { createComponents as s } from "../ComponentAdapter/createComponentsWithDefaults.js";
4
+ import { GustoProviderCustomUIAdapter as p } from "./GustoProviderCustomUIAdapter.js";
5
+ const c = (t) => {
6
+ const { children: e, components: n = {}, locale: o, ...i } = t;
7
+ return /* @__PURE__ */ r(
8
+ p,
9
+ {
10
+ locale: o,
11
+ ...i,
12
+ components: s(n),
13
+ children: /* @__PURE__ */ r(m, { locale: o, children: e })
14
+ }
15
+ );
16
+ }, f = c;
12
17
  export {
13
- a as GustoApiProvider,
14
- d as GustoProvider
18
+ f as GustoApiProvider,
19
+ c as GustoProvider
15
20
  };
16
21
  //# sourceMappingURL=GustoProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GustoProvider.js","sources":["../../../src/contexts/GustoProvider/GustoProvider.tsx"],"sourcesContent":["import type React from 'react'\n// GustoProvider uses react-aria as the default components so we need to include the react-aria I18nProvider here.\n// For use without react-aria, the GustoProviderCustomUIAdapter can be used which does not includes it.\n// eslint-disable-next-line no-restricted-imports\nimport { I18nProvider } from 'react-aria-components'\nimport { defaultComponents } from '../ComponentAdapter/adapters/defaultComponentAdapter'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport {\n GustoProviderCustomUIAdapter,\n type GustoProviderProps,\n} from './GustoProviderCustomUIAdapter'\n\nexport interface GustoApiProps extends Omit<GustoProviderProps, 'components'> {\n components?: Partial<ComponentsContextType>\n children?: React.ReactNode\n}\n\nconst GustoProvider: React.FC<GustoApiProps> = props => {\n const { children, components = {}, locale, ...remainingProps } = props\n\n const mergedComponents = {\n ...defaultComponents,\n ...components,\n }\n\n return (\n <GustoProviderCustomUIAdapter locale={locale} {...remainingProps} components={mergedComponents}>\n {/* react-aria locale provider that exposes correct locale to number formatters */}\n <I18nProvider locale={locale}>{children}</I18nProvider>\n </GustoProviderCustomUIAdapter>\n )\n}\n\nexport { GustoProvider }\n\n/** @deprecated Import from `GustoProvider` instead */\nexport const GustoApiProvider = GustoProvider\n"],"names":["GustoProvider","props","children","components","locale","remainingProps","mergedComponents","defaultComponents","jsx","GustoProviderCustomUIAdapter","I18nProvider","GustoApiProvider"],"mappings":";;;;AAiBA,MAAMA,IAAyC,CAAAC,MAAS;AACtD,QAAM,EAAE,UAAAC,GAAU,YAAAC,IAAa,CAAA,GAAI,QAAAC,GAAQ,GAAGC,MAAmBJ,GAE3DK,IAAmB;AAAA,IACvB,GAAGC;AAAA,IACH,GAAGJ;AAAA,EAAA;AAGL,SACE,gBAAAK,EAACC,GAAA,EAA6B,QAAAL,GAAiB,GAAGC,GAAgB,YAAYC,GAE5E,UAAA,gBAAAE,EAACE,GAAA,EAAa,QAAAN,GAAiB,UAAAF,EAAA,CAAS,EAAA,CAC1C;AAEJ,GAKaS,IAAmBX;"}
1
+ {"version":3,"file":"GustoProvider.js","sources":["../../../src/contexts/GustoProvider/GustoProvider.tsx"],"sourcesContent":["import type React from 'react'\n// GustoProvider uses react-aria as the default components so we need to include the react-aria I18nProvider here.\n// For use without react-aria, the GustoProviderCustomUIAdapter can be used which does not includes it.\n// eslint-disable-next-line no-restricted-imports\nimport { I18nProvider } from 'react-aria-components'\nimport { createComponents } from '../ComponentAdapter/createComponentsWithDefaults'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport {\n GustoProviderCustomUIAdapter,\n type GustoProviderProps,\n} from './GustoProviderCustomUIAdapter'\n\nexport interface GustoApiProps extends Omit<GustoProviderProps, 'components'> {\n components?: Partial<ComponentsContextType>\n children?: React.ReactNode\n}\n\nconst GustoProvider: React.FC<GustoApiProps> = props => {\n const { children, components = {}, locale, ...remainingProps } = props\n\n return (\n <GustoProviderCustomUIAdapter\n locale={locale}\n {...remainingProps}\n components={createComponents(components)}\n >\n {/* react-aria locale provider that exposes correct locale to number formatters */}\n <I18nProvider locale={locale}>{children}</I18nProvider>\n </GustoProviderCustomUIAdapter>\n )\n}\n\nexport { GustoProvider }\n\n/** @deprecated Import from `GustoProvider` instead */\nexport const GustoApiProvider = GustoProvider\n"],"names":["GustoProvider","props","children","components","locale","remainingProps","jsx","GustoProviderCustomUIAdapter","createComponents","I18nProvider","GustoApiProvider"],"mappings":";;;;AAiBA,MAAMA,IAAyC,CAAAC,MAAS;AACtD,QAAM,EAAE,UAAAC,GAAU,YAAAC,IAAa,CAAA,GAAI,QAAAC,GAAQ,GAAGC,MAAmBJ;AAEjE,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAAH;AAAA,MACC,GAAGC;AAAA,MACJ,YAAYG,EAAiBL,CAAU;AAAA,MAGvC,UAAA,gBAAAG,EAACG,GAAA,EAAa,QAAAL,GAAiB,UAAAF,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAG9C,GAKaQ,IAAmBV;"}
@@ -3,22 +3,20 @@ import { ErrorBoundary as h } from "react-error-boundary";
3
3
  import { I18nextProvider as v } from "react-i18next";
4
4
  import { useEffect as g } from "react";
5
5
  import { ComponentsProvider as P } from "../ComponentAdapter/ComponentsProvider.js";
6
+ import { createComponents as C } from "../ComponentAdapter/createComponentsWithDefaults.js";
6
7
  import { ApiProvider as I } from "../ApiProvider/ApiProvider.js";
7
8
  import { LoadingIndicatorProvider as x } from "../LoadingIndicatorProvider/LoadingIndicatorProvider.js";
8
9
  import { SDKI18next as t } from "./SDKI18next.js";
9
- import "classnames";
10
- import "../../shared/constants.js";
11
10
  import { InternalError as y } from "../../components/Common/InternalError/InternalError.js";
12
- import { LocaleProvider as C } from "../LocaleProvider/LocaleProvider.js";
13
- import "../LocaleProvider/useLocale.js";
14
- import { ThemeProvider as L } from "../ThemeProvider/ThemeProvider.js";
15
- const T = (a) => {
11
+ import { LocaleProvider as L } from "../LocaleProvider/LocaleProvider.js";
12
+ import { ThemeProvider as U } from "../ThemeProvider/ThemeProvider.js";
13
+ const R = (a) => {
16
14
  const {
17
- children: d,
15
+ children: c,
18
16
  config: e,
19
17
  dictionary: o,
20
18
  lng: n = "en",
21
- locale: c = "en-US",
19
+ locale: d = "en-US",
22
20
  currency: l = "USD",
23
21
  theme: p,
24
22
  components: s,
@@ -38,9 +36,9 @@ const T = (a) => {
38
36
  }
39
37
  return g(() => {
40
38
  (async () => await t.changeLanguage(n))();
41
- }, [n]), /* @__PURE__ */ r(P, { value: s, children: /* @__PURE__ */ r(x, { value: f, children: /* @__PURE__ */ r(h, { FallbackComponent: y, children: /* @__PURE__ */ r(L, { theme: p, children: /* @__PURE__ */ r(C, { locale: c, currency: l, children: /* @__PURE__ */ r(v, { i18n: t, children: /* @__PURE__ */ r(I, { url: e.baseUrl, headers: e.headers, hooks: e.hooks, children: d }) }, n) }) }) }) }) });
39
+ }, [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) }) }) }) }) });
42
40
  };
43
41
  export {
44
- T as GustoProviderCustomUIAdapter
42
+ R as GustoProviderCustomUIAdapter
45
43
  };
46
44
  //# 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 { 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={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","jsx","LoadingIndicatorProvider","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":";;;;;;;;;;;;;;AA2CA,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,OAAOP,GACzB,UAAA,gBAAAQ,EAACC,GAAA,EAAyB,OAAOR,GAC/B,UAAA,gBAAAO,EAACE,GAAA,EAAc,mBAAmBC,GAChC,UAAA,gBAAAH,EAACI,GAAA,EAAc,OAAAb,GACb,UAAA,gBAAAS,EAACK,GAAA,EAAe,QAAAhB,GAAgB,UAAAC,GAC9B,UAAA,gBAAAU,EAACM,GAAA,EAAgB,MAAMT,GACrB,UAAA,gBAAAG,EAACO,GAAA,EAAY,KAAKrB,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;"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Applies default values only to properties that are undefined in the source object.
3
+ * This is more efficient than object spread as it only sets values that are actually missing.
4
+ */
5
+ export declare function applyMissingDefaults<T>(rawProps: T, defaults: Partial<T>): T;
@@ -0,0 +1,10 @@
1
+ function c(o, n) {
2
+ const t = { ...o };
3
+ for (const i in n)
4
+ o[i] === void 0 && n[i] !== void 0 && (t[i] = n[i]);
5
+ return t;
6
+ }
7
+ export {
8
+ c as applyMissingDefaults
9
+ };
10
+ //# sourceMappingURL=applyMissingDefaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyMissingDefaults.js","sources":["../../src/helpers/applyMissingDefaults.ts"],"sourcesContent":["/**\n * Applies default values only to properties that are undefined in the source object.\n * This is more efficient than object spread as it only sets values that are actually missing.\n */\nexport function applyMissingDefaults<T>(rawProps: T, defaults: Partial<T>): T {\n const result = { ...rawProps }\n\n for (const key in defaults) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((rawProps as any)[key] === undefined && defaults[key] !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(result as any)[key] = defaults[key]\n }\n }\n\n return result\n}\n"],"names":["applyMissingDefaults","rawProps","defaults","result","key"],"mappings":"AAIO,SAASA,EAAwBC,GAAaC,GAAyB;AAC5E,QAAMC,IAAS,EAAE,GAAGF,EAAA;AAEpB,aAAWG,KAAOF;AAEhB,IAAKD,EAAiBG,CAAG,MAAM,UAAaF,EAASE,CAAG,MAAM,WAE1DD,EAAeC,CAAG,IAAIF,EAASE,CAAG;AAIxC,SAAOD;AACT;"}
@@ -1,20 +1,19 @@
1
1
  import m from "dompurify";
2
2
  import "react-i18next";
3
3
  import "react";
4
- import "../contexts/LocaleProvider/useLocale.js";
5
- const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), h = ({
4
+ const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), l = ({
6
5
  first_name: t,
7
6
  last_name: e
8
7
  }) => `${t ? c(t) : ""}${e ? n(c(e)) : ""}`, n = (t) => t ? ` ${t}` : "", i = (t) => {
9
8
  const e = n(t.street1), r = n(t.street2);
10
9
  return `${e},${r}`;
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") => {
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") => {
12
11
  const r = t.toLocaleString(e, {
13
12
  minimumFractionDigits: 2,
14
13
  maximumFractionDigits: 2
15
14
  });
16
15
  return p(r, !1);
17
- }, S = ({
16
+ }, C = ({
18
17
  rate: t,
19
18
  paymentUnit: e,
20
19
  t: r,
@@ -42,20 +41,20 @@ const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), h = ({
42
41
  return o;
43
42
  }
44
43
  }, y = { ALLOWED_TAGS: ["a", "b", "strong"], ALLOWED_ATTR: ["href", "target"] };
45
- function D(t) {
44
+ function S(t) {
46
45
  return t ? { __html: m.sanitize(t, y) } : { __html: "" };
47
46
  }
48
- const F = (t) => t.replace(/\D/g, ""), L = (t) => t.replace(/_([a-z])/g, (e, r) => r.toUpperCase());
47
+ const D = (t) => t.replace(/\D/g, ""), F = (t) => t.replace(/_([a-z])/g, (e, r) => r.toUpperCase());
49
48
  export {
50
- C as addressInline,
49
+ h as addressInline,
51
50
  p as amountStr,
52
- D as createMarkup,
53
- h as firstLastName,
51
+ S as createMarkup,
52
+ l as firstLastName,
54
53
  s as formatNumberAsCurrency,
55
- S as formatPayRate,
54
+ C as formatPayRate,
56
55
  u as getCityStateZip,
57
56
  i as getStreet,
58
- F as removeNonDigits,
59
- L as snakeCaseToCamelCase
57
+ D as removeNonDigits,
58
+ F as snakeCaseToCamelCase
60
59
  };
61
60
  //# sourceMappingURL=formattedStrings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formattedStrings.js","sources":["../../src/helpers/formattedStrings.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport { type TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useCallback } from 'react'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\n\nconst capitalize = (word: string) => word.charAt(0).toLocaleUpperCase() + word.slice(1)\n\nexport const firstLastName = ({\n first_name,\n last_name,\n}: {\n first_name?: string | null\n last_name?: string | null\n}) =>\n `${first_name ? capitalize(first_name) : ''}${last_name ? maybeString(capitalize(last_name)) : ''}`\n\nconst maybeString = (str: string | null | undefined) => {\n return str ? ` ${str}` : ''\n}\n\nexport const getStreet = (address: EmployeeAddress | Location) => {\n const street1 = maybeString(address.street1)\n const street2 = maybeString(address.street2)\n\n return `${street1},${street2}`\n}\n\nexport const getCityStateZip = (address: EmployeeAddress | Location) =>\n `${maybeString(address.city)}, ${maybeString(address.state)} ${maybeString(address.zip)}`\n\nexport const addressInline = (address: EmployeeAddress | Location) =>\n `${getStreet(address)} ${getCityStateZip(address)}`\n\nexport const currentDateString = () => {\n const d = new Date()\n const dateString = `${String(d.getFullYear())}-${('0' + String(d.getMonth() + 1)).slice(-2)}-${('0' + String(d.getDate())).slice(-2)}`\n return dateString\n}\n\nexport function isNumberKey({ which, keyCode }: KeyboardEvent) {\n const charCode = which ? which : keyCode\n if (charCode > 31 && charCode != 46 && (charCode < 48 || charCode > 57)) return false\n return true\n}\n\nexport const booleanToString = (value: boolean) => (value ? 'true' : 'false')\n\nexport const amountStr = (amount: string, isPercentage: boolean) =>\n isPercentage ? `${amount}%` : `$${amount}`\n\nexport const formatNumberAsCurrency = (amount: number, locale: string = 'en-US') => {\n const formattedNumber = amount.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })\n return amountStr(formattedNumber, false)\n}\n\nexport const formatPayRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('payRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('payRateFormats.weekly', {\n amount: formatNumberAsCurrency(rate * 52, locale),\n ns: 'common',\n })\n case 'Month':\n return t('payRateFormats.monthly', {\n amount: formatNumberAsCurrency(rate * 12, locale),\n ns: 'common',\n })\n case 'Year':\n return t('payRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('payRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\nexport const useFormatPayRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (rate: number, paymentUnit: string) => {\n return formatPayRate({ rate, paymentUnit, t, locale })\n },\n [t, locale],\n )\n}\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['href', 'target'] }\nexport function createMarkup(dirty: string) {\n if (!dirty) return { __html: '' }\n return { __html: DOMPurify.sanitize(dirty, dompurifyConfig) }\n}\n\nexport const removeNonDigits = (value: string): string => {\n return value.replace(/\\D/g, '')\n}\n\nexport const snakeCaseToCamelCase = (s: string) => {\n return s.replace(/_([a-z])/g, (_: string, char: string) => char.toUpperCase())\n}\n\nexport const camelCaseToSnakeCase = (s: string) => {\n return s\n .replace(\n /([a-z0-9])([A-Z])/g,\n (_: string, group1: string, group2: string) => `${group1}_${group2.toLowerCase()}`,\n )\n .replace(\n /([A-Z])([A-Z])(?=[a-z])/g,\n (_: string, group1: string, group2: string) =>\n `${group1.toLowerCase()}_${group2.toLowerCase()}`,\n )\n .toLowerCase()\n}\n"],"names":["capitalize","word","firstLastName","first_name","last_name","maybeString","str","getStreet","address","street1","street2","getCityStateZip","addressInline","amountStr","amount","isPercentage","formatNumberAsCurrency","locale","formattedNumber","formatPayRate","rate","paymentUnit","t","dompurifyConfig","createMarkup","dirty","DOMPurify","removeNonDigits","value","snakeCaseToCamelCase","s","_","char"],"mappings":";;;;AAQA,MAAMA,IAAa,CAACC,MAAiBA,EAAK,OAAO,CAAC,EAAE,sBAAsBA,EAAK,MAAM,CAAC,GAEzEC,IAAgB,CAAC;AAAA,EAC5B,YAAAC;AAAA,EACA,WAAAC;AACF,MAIE,GAAGD,IAAaH,EAAWG,CAAU,IAAI,EAAE,GAAGC,IAAYC,EAAYL,EAAWI,CAAS,CAAC,IAAI,EAAE,IAE7FC,IAAc,CAACC,MACZA,IAAM,IAAIA,CAAG,KAAK,IAGdC,IAAY,CAACC,MAAwC;AAChE,QAAMC,IAAUJ,EAAYG,EAAQ,OAAO,GACrCE,IAAUL,EAAYG,EAAQ,OAAO;AAE3C,SAAO,GAAGC,CAAO,IAAIC,CAAO;AAC9B,GAEaC,IAAkB,CAACH,MAC9B,GAAGH,EAAYG,EAAQ,IAAI,CAAC,KAAKH,EAAYG,EAAQ,KAAK,CAAC,IAAIH,EAAYG,EAAQ,GAAG,CAAC,IAE5EI,IAAgB,CAACJ,MAC5B,GAAGD,EAAUC,CAAO,CAAC,IAAIG,EAAgBH,CAAO,CAAC,IAgBtCK,IAAY,CAACC,GAAgBC,MACxCA,IAAe,GAAGD,CAAM,MAAM,IAAIA,CAAM,IAE7BE,IAAyB,CAACF,GAAgBG,IAAiB,YAAY;AAClF,QAAMC,IAAkBJ,EAAO,eAAeG,GAAQ;AAAA,IACpD,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,EAAA,CACxB;AACD,SAAOJ,EAAUK,GAAiB,EAAK;AACzC,GAEaC,IAAgB,CAAC;AAAA,EAC5B,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAAC;AAAA,EACA,QAAAL,IAAS;AACX,MAKM;AACJ,QAAMH,IAASE,EAAuBI,GAAMH,CAAM;AAElD,UAAQI,GAAA;AAAA,IACN,KAAK;AACH,aAAOC,EAAE,yBAAyB,EAAE,QAAAR,GAAQ,IAAI,UAAU;AAAA,IAC5D,KAAK;AACH,aAAOQ,EAAE,yBAAyB;AAAA,QAChC,QAAQN,EAAuBI,IAAO,IAAIH,CAAM;AAAA,QAChD,IAAI;AAAA,MAAA,CACL;AAAA,IACH,KAAK;AACH,aAAOK,EAAE,0BAA0B;AAAA,QACjC,QAAQN,EAAuBI,IAAO,IAAIH,CAAM;AAAA,QAChD,IAAI;AAAA,MAAA,CACL;AAAA,IACH,KAAK;AACH,aAAOK,EAAE,yBAAyB,EAAE,QAAAR,GAAQ,IAAI,UAAU;AAAA,IAC5D,KAAK;AACH,aAAOQ,EAAE,2BAA2B,EAAE,QAAAR,GAAQ,IAAI,UAAU;AAAA,IAC9D;AACE,aAAOA;AAAA,EAAA;AAEb,GAcMS,IAAkB,EAAE,cAAc,CAAC,KAAK,KAAK,QAAQ,GAAG,cAAc,CAAC,QAAQ,QAAQ,EAAA;AACtF,SAASC,EAAaC,GAAe;AAC1C,SAAKA,IACE,EAAE,QAAQC,EAAU,SAASD,GAAOF,CAAe,EAAA,IADvC,EAAE,QAAQ,GAAA;AAE/B;AAEO,MAAMI,IAAkB,CAACC,MACvBA,EAAM,QAAQ,OAAO,EAAE,GAGnBC,IAAuB,CAACC,MAC5BA,EAAE,QAAQ,aAAa,CAACC,GAAWC,MAAiBA,EAAK,aAAa;"}
1
+ {"version":3,"file":"formattedStrings.js","sources":["../../src/helpers/formattedStrings.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport { type TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useCallback } from 'react'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\n\nconst capitalize = (word: string) => word.charAt(0).toLocaleUpperCase() + word.slice(1)\n\nexport const firstLastName = ({\n first_name,\n last_name,\n}: {\n first_name?: string | null\n last_name?: string | null\n}) =>\n `${first_name ? capitalize(first_name) : ''}${last_name ? maybeString(capitalize(last_name)) : ''}`\n\nconst maybeString = (str: string | null | undefined) => {\n return str ? ` ${str}` : ''\n}\n\nexport const getStreet = (address: EmployeeAddress | Location) => {\n const street1 = maybeString(address.street1)\n const street2 = maybeString(address.street2)\n\n return `${street1},${street2}`\n}\n\nexport const getCityStateZip = (address: EmployeeAddress | Location) =>\n `${maybeString(address.city)}, ${maybeString(address.state)} ${maybeString(address.zip)}`\n\nexport const addressInline = (address: EmployeeAddress | Location) =>\n `${getStreet(address)} ${getCityStateZip(address)}`\n\nexport const currentDateString = () => {\n const d = new Date()\n const dateString = `${String(d.getFullYear())}-${('0' + String(d.getMonth() + 1)).slice(-2)}-${('0' + String(d.getDate())).slice(-2)}`\n return dateString\n}\n\nexport function isNumberKey({ which, keyCode }: KeyboardEvent) {\n const charCode = which ? which : keyCode\n if (charCode > 31 && charCode != 46 && (charCode < 48 || charCode > 57)) return false\n return true\n}\n\nexport const booleanToString = (value: boolean) => (value ? 'true' : 'false')\n\nexport const amountStr = (amount: string, isPercentage: boolean) =>\n isPercentage ? `${amount}%` : `$${amount}`\n\nexport const formatNumberAsCurrency = (amount: number, locale: string = 'en-US') => {\n const formattedNumber = amount.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })\n return amountStr(formattedNumber, false)\n}\n\nexport const formatPayRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('payRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('payRateFormats.weekly', {\n amount: formatNumberAsCurrency(rate * 52, locale),\n ns: 'common',\n })\n case 'Month':\n return t('payRateFormats.monthly', {\n amount: formatNumberAsCurrency(rate * 12, locale),\n ns: 'common',\n })\n case 'Year':\n return t('payRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('payRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\nexport const useFormatPayRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (rate: number, paymentUnit: string) => {\n return formatPayRate({ rate, paymentUnit, t, locale })\n },\n [t, locale],\n )\n}\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['href', 'target'] }\nexport function createMarkup(dirty: string) {\n if (!dirty) return { __html: '' }\n return { __html: DOMPurify.sanitize(dirty, dompurifyConfig) }\n}\n\nexport const removeNonDigits = (value: string): string => {\n return value.replace(/\\D/g, '')\n}\n\nexport const snakeCaseToCamelCase = (s: string) => {\n return s.replace(/_([a-z])/g, (_: string, char: string) => char.toUpperCase())\n}\n\nexport const camelCaseToSnakeCase = (s: string) => {\n return s\n .replace(\n /([a-z0-9])([A-Z])/g,\n (_: string, group1: string, group2: string) => `${group1}_${group2.toLowerCase()}`,\n )\n .replace(\n /([A-Z])([A-Z])(?=[a-z])/g,\n (_: string, group1: string, group2: string) =>\n `${group1.toLowerCase()}_${group2.toLowerCase()}`,\n )\n .toLowerCase()\n}\n"],"names":["capitalize","word","firstLastName","first_name","last_name","maybeString","str","getStreet","address","street1","street2","getCityStateZip","addressInline","amountStr","amount","isPercentage","formatNumberAsCurrency","locale","formattedNumber","formatPayRate","rate","paymentUnit","t","dompurifyConfig","createMarkup","dirty","DOMPurify","removeNonDigits","value","snakeCaseToCamelCase","s","_","char"],"mappings":";;;AAQA,MAAMA,IAAa,CAACC,MAAiBA,EAAK,OAAO,CAAC,EAAE,sBAAsBA,EAAK,MAAM,CAAC,GAEzEC,IAAgB,CAAC;AAAA,EAC5B,YAAAC;AAAA,EACA,WAAAC;AACF,MAIE,GAAGD,IAAaH,EAAWG,CAAU,IAAI,EAAE,GAAGC,IAAYC,EAAYL,EAAWI,CAAS,CAAC,IAAI,EAAE,IAE7FC,IAAc,CAACC,MACZA,IAAM,IAAIA,CAAG,KAAK,IAGdC,IAAY,CAACC,MAAwC;AAChE,QAAMC,IAAUJ,EAAYG,EAAQ,OAAO,GACrCE,IAAUL,EAAYG,EAAQ,OAAO;AAE3C,SAAO,GAAGC,CAAO,IAAIC,CAAO;AAC9B,GAEaC,IAAkB,CAACH,MAC9B,GAAGH,EAAYG,EAAQ,IAAI,CAAC,KAAKH,EAAYG,EAAQ,KAAK,CAAC,IAAIH,EAAYG,EAAQ,GAAG,CAAC,IAE5EI,IAAgB,CAACJ,MAC5B,GAAGD,EAAUC,CAAO,CAAC,IAAIG,EAAgBH,CAAO,CAAC,IAgBtCK,IAAY,CAACC,GAAgBC,MACxCA,IAAe,GAAGD,CAAM,MAAM,IAAIA,CAAM,IAE7BE,IAAyB,CAACF,GAAgBG,IAAiB,YAAY;AAClF,QAAMC,IAAkBJ,EAAO,eAAeG,GAAQ;AAAA,IACpD,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,EAAA,CACxB;AACD,SAAOJ,EAAUK,GAAiB,EAAK;AACzC,GAEaC,IAAgB,CAAC;AAAA,EAC5B,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAAC;AAAA,EACA,QAAAL,IAAS;AACX,MAKM;AACJ,QAAMH,IAASE,EAAuBI,GAAMH,CAAM;AAElD,UAAQI,GAAA;AAAA,IACN,KAAK;AACH,aAAOC,EAAE,yBAAyB,EAAE,QAAAR,GAAQ,IAAI,UAAU;AAAA,IAC5D,KAAK;AACH,aAAOQ,EAAE,yBAAyB;AAAA,QAChC,QAAQN,EAAuBI,IAAO,IAAIH,CAAM;AAAA,QAChD,IAAI;AAAA,MAAA,CACL;AAAA,IACH,KAAK;AACH,aAAOK,EAAE,0BAA0B;AAAA,QACjC,QAAQN,EAAuBI,IAAO,IAAIH,CAAM;AAAA,QAChD,IAAI;AAAA,MAAA,CACL;AAAA,IACH,KAAK;AACH,aAAOK,EAAE,yBAAyB,EAAE,QAAAR,GAAQ,IAAI,UAAU;AAAA,IAC5D,KAAK;AACH,aAAOQ,EAAE,2BAA2B,EAAE,QAAAR,GAAQ,IAAI,UAAU;AAAA,IAC9D;AACE,aAAOA;AAAA,EAAA;AAEb,GAcMS,IAAkB,EAAE,cAAc,CAAC,KAAK,KAAK,QAAQ,GAAG,cAAc,CAAC,QAAQ,QAAQ,EAAA;AACtF,SAASC,EAAaC,GAAe;AAC1C,SAAKA,IACE,EAAE,QAAQC,EAAU,SAASD,GAAOF,CAAe,EAAA,IADvC,EAAE,QAAQ,GAAA;AAE/B;AAEO,MAAMI,IAAkB,CAACC,MACvBA,EAAM,QAAQ,OAAO,EAAE,GAGnBC,IAAuB,CAACC,MAC5BA,EAAE,QAAQ,aAAa,CAACC,GAAWC,MAAiBA,EAAK,aAAa;"}
package/dist/i18n/I18n.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import p from "../_virtual/dynamic-import-helper.js";
2
2
  import { useTranslation as m } from "react-i18next";
3
3
  import { LRUCache as l } from "../helpers/LRUCache.js";
4
- const C = "common", s = new l(50), c = ({ lng: n = "en", ns: o }) => {
4
+ const C = "common", s = new l(50), y = ({ lng: n = "en", ns: o }) => {
5
5
  let e = !0, r = !1, t;
6
6
  const i = (async () => {
7
7
  try {
8
- t = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.AddBank.json": () => import("./en/Company.AddBank.json.js"), "./en/Company.Addresses.json": () => import("./en/Company.Addresses.json.js"), "./en/Company.AssignSignatory.json": () => import("./en/Company.AssignSignatory.json.js"), "./en/Company.BankAccount.json": () => import("./en/Company.BankAccount.json.js"), "./en/Company.DocumentList.json": () => import("./en/Company.DocumentList.json.js"), "./en/Company.FederalTaxes.json": () => import("./en/Company.FederalTaxes.json.js"), "./en/Company.Industry.json": () => import("./en/Company.Industry.json.js"), "./en/Company.Locations.json": () => import("./en/Company.Locations.json.js"), "./en/Company.OnboardingOverview.json": () => import("./en/Company.OnboardingOverview.json.js"), "./en/Company.PaySchedule.json": () => import("./en/Company.PaySchedule.json.js"), "./en/Company.SignatureForm.json": () => import("./en/Company.SignatureForm.json.js"), "./en/Company.StateTaxes.json": () => import("./en/Company.StateTaxes.json.js"), "./en/Contractor.Address.json": () => import("./en/Contractor.Address.json.js"), "./en/Contractor.ContractorList.json": () => import("./en/Contractor.ContractorList.json.js"), "./en/Contractor.NewHireReport.json": () => import("./en/Contractor.NewHireReport.json.js"), "./en/Contractor.PaymentMethod.json": () => import("./en/Contractor.PaymentMethod.json.js"), "./en/Contractor.Profile.json": () => import("./en/Contractor.Profile.json.js"), "./en/Contractor.Submit.json": () => import("./en/Contractor.Submit.json.js"), "./en/Employee.BankAccount.json": () => import("./en/Employee.BankAccount.json.js"), "./en/Employee.Compensation.json": () => import("./en/Employee.Compensation.json.js"), "./en/Employee.Deductions.json": () => import("./en/Employee.Deductions.json.js"), "./en/Employee.DocumentSigner.json": () => import("./en/Employee.DocumentSigner.json.js"), "./en/Employee.EmployeeList.json": () => import("./en/Employee.EmployeeList.json.js"), "./en/Employee.FederalTaxes.json": () => import("./en/Employee.FederalTaxes.json.js"), "./en/Employee.HomeAddress.json": () => import("./en/Employee.HomeAddress.json.js"), "./en/Employee.Landing.json": () => import("./en/Employee.Landing.json.js"), "./en/Employee.OnboardingSummary.json": () => import("./en/Employee.OnboardingSummary.json.js"), "./en/Employee.PaySchedules.json": () => import("./en/Employee.PaySchedules.json.js"), "./en/Employee.PaymentMethod.json": () => import("./en/Employee.PaymentMethod.json.js"), "./en/Employee.Profile.json": () => import("./en/Employee.Profile.json.js"), "./en/Employee.SplitPaycheck.json": () => import("./en/Employee.SplitPaycheck.json.js"), "./en/Employee.StateTaxes.json": () => import("./en/Employee.StateTaxes.json.js"), "./en/Employee.Taxes.json": () => import("./en/Employee.Taxes.json.js"), "./en/Payroll.PayrollConfiguration.json": () => import("./en/Payroll.PayrollConfiguration.json.js"), "./en/Payroll.PayrollHistoryList.json": () => import("./en/Payroll.PayrollHistoryList.json.js"), "./en/Payroll.PayrollList.json": () => import("./en/Payroll.PayrollList.json.js"), "./en/Payroll.PayrollSchedule.json": () => import("./en/Payroll.PayrollSchedule.json.js"), "./en/common.json": () => import("./en/common.json.js") }), `./${n}/${o}.json`, 3)).default, e = !1;
8
+ t = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.AddBank.json": () => import("./en/Company.AddBank.json.js"), "./en/Company.Addresses.json": () => import("./en/Company.Addresses.json.js"), "./en/Company.AssignSignatory.json": () => import("./en/Company.AssignSignatory.json.js"), "./en/Company.BankAccount.json": () => import("./en/Company.BankAccount.json.js"), "./en/Company.DocumentList.json": () => import("./en/Company.DocumentList.json.js"), "./en/Company.FederalTaxes.json": () => import("./en/Company.FederalTaxes.json.js"), "./en/Company.Industry.json": () => import("./en/Company.Industry.json.js"), "./en/Company.Locations.json": () => import("./en/Company.Locations.json.js"), "./en/Company.OnboardingOverview.json": () => import("./en/Company.OnboardingOverview.json.js"), "./en/Company.PaySchedule.json": () => import("./en/Company.PaySchedule.json.js"), "./en/Company.SignatureForm.json": () => import("./en/Company.SignatureForm.json.js"), "./en/Company.StateTaxes.json": () => import("./en/Company.StateTaxes.json.js"), "./en/Contractor.Address.json": () => import("./en/Contractor.Address.json.js"), "./en/Contractor.ContractorList.json": () => import("./en/Contractor.ContractorList.json.js"), "./en/Contractor.NewHireReport.json": () => import("./en/Contractor.NewHireReport.json.js"), "./en/Contractor.PaymentMethod.json": () => import("./en/Contractor.PaymentMethod.json.js"), "./en/Contractor.Profile.json": () => import("./en/Contractor.Profile.json.js"), "./en/Contractor.Submit.json": () => import("./en/Contractor.Submit.json.js"), "./en/Employee.BankAccount.json": () => import("./en/Employee.BankAccount.json.js"), "./en/Employee.Compensation.json": () => import("./en/Employee.Compensation.json.js"), "./en/Employee.Deductions.json": () => import("./en/Employee.Deductions.json.js"), "./en/Employee.DocumentSigner.json": () => import("./en/Employee.DocumentSigner.json.js"), "./en/Employee.EmployeeList.json": () => import("./en/Employee.EmployeeList.json.js"), "./en/Employee.FederalTaxes.json": () => import("./en/Employee.FederalTaxes.json.js"), "./en/Employee.HomeAddress.json": () => import("./en/Employee.HomeAddress.json.js"), "./en/Employee.Landing.json": () => import("./en/Employee.Landing.json.js"), "./en/Employee.OnboardingSummary.json": () => import("./en/Employee.OnboardingSummary.json.js"), "./en/Employee.PaySchedules.json": () => import("./en/Employee.PaySchedules.json.js"), "./en/Employee.PaymentMethod.json": () => import("./en/Employee.PaymentMethod.json.js"), "./en/Employee.Profile.json": () => import("./en/Employee.Profile.json.js"), "./en/Employee.SplitPaycheck.json": () => import("./en/Employee.SplitPaycheck.json.js"), "./en/Employee.StateTaxes.json": () => import("./en/Employee.StateTaxes.json.js"), "./en/Employee.Taxes.json": () => import("./en/Employee.Taxes.json.js"), "./en/Payroll.PayrollConfiguration.json": () => import("./en/Payroll.PayrollConfiguration.json.js"), "./en/Payroll.PayrollEditEmployee.json": () => import("./en/Payroll.PayrollEditEmployee.json.js"), "./en/Payroll.PayrollHistoryList.json": () => import("./en/Payroll.PayrollHistoryList.json.js"), "./en/Payroll.PayrollList.json": () => import("./en/Payroll.PayrollList.json.js"), "./en/Payroll.PayrollOverview.json": () => import("./en/Payroll.PayrollOverview.json.js"), "./en/Payroll.PayrollSchedule.json": () => import("./en/Payroll.PayrollSchedule.json.js"), "./en/Payroll.RunPayroll.json": () => import("./en/Payroll.RunPayroll.json.js"), "./en/common.json": () => import("./en/common.json.js"), "./en/payroll.payrollhistory.json": () => import("./en/payroll.payrollhistory.json.js") }), `./${n}/${o}.json`, 3)).default, e = !1;
9
9
  } catch {
10
10
  r = !0, e = !1;
11
11
  }
@@ -21,13 +21,13 @@ const C = "common", s = new l(50), c = ({ lng: n = "en", ns: o }) => {
21
21
  const { i18n: o } = m();
22
22
  if (!n) return;
23
23
  const e = `${o.resolvedLanguage}:${n}`;
24
- s.get(e) === null && s.put(e, c({ lng: o.resolvedLanguage, ns: n }));
24
+ s.get(e) === null && s.put(e, y({ lng: o.resolvedLanguage, ns: n }));
25
25
  const r = s.get(e);
26
26
  if (r) {
27
27
  const t = r();
28
28
  o.addResourceBundle(o.resolvedLanguage ?? "en", n, t, !0, !1);
29
29
  }
30
- }, f = (n, o) => {
30
+ }, E = (n, o) => {
31
31
  const { i18n: e } = m();
32
32
  if (o)
33
33
  for (const r in o)
@@ -35,7 +35,7 @@ const C = "common", s = new l(50), c = ({ lng: n = "en", ns: o }) => {
35
35
  };
36
36
  export {
37
37
  C as defaultNS,
38
- f as useComponentDictionary,
38
+ E as useComponentDictionary,
39
39
  g as useI18n
40
40
  };
41
41
  //# sourceMappingURL=I18n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"I18n.js","sources":["../../src/i18n/I18n.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { CustomTypeOptions } from 'i18next'\nimport { LRUCache } from '@/helpers/LRUCache'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\n\nexport const defaultNS = 'common'\n\n//LRU cache holding requested resources\nconst resourceCache = new LRUCache(50)\n/**\n * Dynamic loading of translation resources - works with Suspence to prevent early access to loadable strings\n * @param lng(string): resource language\n * @param ns(string): Namespace/name of the component/resource\n * @returns Promise<Translation resource>\n */\nconst loadResource = ({ lng = 'en', ns }: { ns: string; lng?: string }) => {\n let isLoading = true\n let isError = false\n let resource: Record<string, string>\n\n const importResources = async () => {\n try {\n const module = await import(`@/i18n/${lng}/${ns}.json`)\n\n resource = module.default\n isLoading = false\n } catch (err) {\n isError = true\n isLoading = false\n }\n }\n const promise = importResources()\n return () => {\n if (isLoading) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw promise // Throw the promise to indicate Suspense should suspend.\n } else if (isError) {\n throw new Error(`Error loading translation for component: ${ns}`) // Handle error\n } else {\n return resource // Return the resource when loading is complete\n }\n }\n}\n\n/**\n * Hook that allows component to load custom dictionary\n * @param @private {string} ns - Namespace - should match component name exactly - not exposed to consumers\n */\nexport const useI18n = (ns: keyof CustomTypeOptions['resources'] | null) => {\n //Getting our instance of i18n -> supplied by the provider set in GustoApiProvider\n const { i18n: i18nInstance } = useTranslation()\n //Abort when namespace is not provided\n if (!ns) return\n const key = `${i18nInstance.resolvedLanguage}:${ns}`\n //Skip loading default resource if it is already in cache\n if (resourceCache.get(key) === null) {\n //If resource not in cache, initiate loading and add getter to cache\n resourceCache.put(key, loadResource({ lng: i18nInstance.resolvedLanguage, ns: ns }))\n }\n //Get resourceGetter from cache\n const resourceGetter = resourceCache.get(key)\n if (resourceGetter) {\n const resource = resourceGetter()\n i18nInstance.addResourceBundle(i18nInstance.resolvedLanguage ?? 'en', ns, resource, true, false) //Last argument is set to false to prevent override of keys provided by partners on GustoApiProvider level through dictionary prop\n }\n}\n\n//Used by individual components to override their dictionaries with partner provided resources\nexport const useComponentDictionary = <K extends keyof Resources>(\n ns: keyof CustomTypeOptions['resources'],\n resource?: ResourceDictionary<K> | null,\n) => {\n const { i18n: i18nInstance } = useTranslation()\n if (resource) {\n for (const lang in resource) {\n i18nInstance.addResourceBundle(lang, ns, resource[lang], true, true)\n }\n }\n}\n"],"names":["defaultNS","resourceCache","LRUCache","loadResource","lng","ns","isLoading","isError","resource","promise","__variableDynamicImportRuntimeHelper","useI18n","i18nInstance","useTranslation","key","resourceGetter","useComponentDictionary","lang"],"mappings":";;;AAKO,MAAMA,IAAY,UAGnBC,IAAgB,IAAIC,EAAS,EAAE,GAO/BC,IAAe,CAAC,EAAE,KAAAC,IAAM,MAAM,IAAAC,QAAuC;AACzE,MAAIC,IAAY,IACZC,IAAU,IACVC;AAaJ,QAAMC,KAXkB,YAAY;AAClC,QAAI;AAGF,MAAAD,KAFe,MAAME,msGAAA,KAAAN,CAAA,IAAAC,CAAA,SAAA,CAAA,GAEH,SAClBC,IAAY;AAAA,IACd,QAAc;AACZ,MAAAC,IAAU,IACVD,IAAY;AAAA,IACd;AAAA,EACF,GACgB;AAChB,SAAO,MAAM;AACX,QAAIA;AAEF,YAAMG;QACGF;AACT,YAAM,IAAI,MAAM,4CAA4CF,CAAE,EAAE;AAEhE,WAAOG;AAAA,EAEX;AACF,GAMaG,IAAU,CAACN,MAAoD;AAE1E,QAAM,EAAE,MAAMO,EAAA,IAAiBC,EAAA;AAE/B,MAAI,CAACR,EAAI;AACT,QAAMS,IAAM,GAAGF,EAAa,gBAAgB,IAAIP,CAAE;AAElD,EAAIJ,EAAc,IAAIa,CAAG,MAAM,QAE7Bb,EAAc,IAAIa,GAAKX,EAAa,EAAE,KAAKS,EAAa,kBAAkB,IAAAP,EAAA,CAAQ,CAAC;AAGrF,QAAMU,IAAiBd,EAAc,IAAIa,CAAG;AAC5C,MAAIC,GAAgB;AAClB,UAAMP,IAAWO,EAAA;AACjB,IAAAH,EAAa,kBAAkBA,EAAa,oBAAoB,MAAMP,GAAIG,GAAU,IAAM,EAAK;AAAA,EACjG;AACF,GAGaQ,IAAyB,CACpCX,GACAG,MACG;AACH,QAAM,EAAE,MAAMI,EAAA,IAAiBC,EAAA;AAC/B,MAAIL;AACF,eAAWS,KAAQT;AACjB,MAAAI,EAAa,kBAAkBK,GAAMZ,GAAIG,EAASS,CAAI,GAAG,IAAM,EAAI;AAGzE;"}
1
+ {"version":3,"file":"I18n.js","sources":["../../src/i18n/I18n.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { CustomTypeOptions } from 'i18next'\nimport { LRUCache } from '@/helpers/LRUCache'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\n\nexport const defaultNS = 'common'\n\n//LRU cache holding requested resources\nconst resourceCache = new LRUCache(50)\n/**\n * Dynamic loading of translation resources - works with Suspence to prevent early access to loadable strings\n * @param lng(string): resource language\n * @param ns(string): Namespace/name of the component/resource\n * @returns Promise<Translation resource>\n */\nconst loadResource = ({ lng = 'en', ns }: { ns: string; lng?: string }) => {\n let isLoading = true\n let isError = false\n let resource: Record<string, string>\n\n const importResources = async () => {\n try {\n const module = await import(`@/i18n/${lng}/${ns}.json`)\n\n resource = module.default\n isLoading = false\n } catch (err) {\n isError = true\n isLoading = false\n }\n }\n const promise = importResources()\n return () => {\n if (isLoading) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw promise // Throw the promise to indicate Suspense should suspend.\n } else if (isError) {\n throw new Error(`Error loading translation for component: ${ns}`) // Handle error\n } else {\n return resource // Return the resource when loading is complete\n }\n }\n}\n\n/**\n * Hook that allows component to load custom dictionary\n * @param @private {string} ns - Namespace - should match component name exactly - not exposed to consumers\n */\nexport const useI18n = (ns: keyof CustomTypeOptions['resources'] | null) => {\n //Getting our instance of i18n -> supplied by the provider set in GustoApiProvider\n const { i18n: i18nInstance } = useTranslation()\n //Abort when namespace is not provided\n if (!ns) return\n const key = `${i18nInstance.resolvedLanguage}:${ns}`\n //Skip loading default resource if it is already in cache\n if (resourceCache.get(key) === null) {\n //If resource not in cache, initiate loading and add getter to cache\n resourceCache.put(key, loadResource({ lng: i18nInstance.resolvedLanguage, ns: ns }))\n }\n //Get resourceGetter from cache\n const resourceGetter = resourceCache.get(key)\n if (resourceGetter) {\n const resource = resourceGetter()\n i18nInstance.addResourceBundle(i18nInstance.resolvedLanguage ?? 'en', ns, resource, true, false) //Last argument is set to false to prevent override of keys provided by partners on GustoApiProvider level through dictionary prop\n }\n}\n\n//Used by individual components to override their dictionaries with partner provided resources\nexport const useComponentDictionary = <K extends keyof Resources>(\n ns: keyof CustomTypeOptions['resources'],\n resource?: ResourceDictionary<K> | null,\n) => {\n const { i18n: i18nInstance } = useTranslation()\n if (resource) {\n for (const lang in resource) {\n i18nInstance.addResourceBundle(lang, ns, resource[lang], true, true)\n }\n }\n}\n"],"names":["defaultNS","resourceCache","LRUCache","loadResource","lng","ns","isLoading","isError","resource","promise","__variableDynamicImportRuntimeHelper","useI18n","i18nInstance","useTranslation","key","resourceGetter","useComponentDictionary","lang"],"mappings":";;;AAKO,MAAMA,IAAY,UAGnBC,IAAgB,IAAIC,EAAS,EAAE,GAO/BC,IAAe,CAAC,EAAE,KAAAC,IAAM,MAAM,IAAAC,QAAuC;AACzE,MAAIC,IAAY,IACZC,IAAU,IACVC;AAaJ,QAAMC,KAXkB,YAAY;AAClC,QAAI;AAGF,MAAAD,KAFe,MAAME,2iHAAA,KAAAN,CAAA,IAAAC,CAAA,SAAA,CAAA,GAEH,SAClBC,IAAY;AAAA,IACd,QAAc;AACZ,MAAAC,IAAU,IACVD,IAAY;AAAA,IACd;AAAA,EACF,GACgB;AAChB,SAAO,MAAM;AACX,QAAIA;AAEF,YAAMG;QACGF;AACT,YAAM,IAAI,MAAM,4CAA4CF,CAAE,EAAE;AAEhE,WAAOG;AAAA,EAEX;AACF,GAMaG,IAAU,CAACN,MAAoD;AAE1E,QAAM,EAAE,MAAMO,EAAA,IAAiBC,EAAA;AAE/B,MAAI,CAACR,EAAI;AACT,QAAMS,IAAM,GAAGF,EAAa,gBAAgB,IAAIP,CAAE;AAElD,EAAIJ,EAAc,IAAIa,CAAG,MAAM,QAE7Bb,EAAc,IAAIa,GAAKX,EAAa,EAAE,KAAKS,EAAa,kBAAkB,IAAAP,EAAA,CAAQ,CAAC;AAGrF,QAAMU,IAAiBd,EAAc,IAAIa,CAAG;AAC5C,MAAIC,GAAgB;AAClB,UAAMP,IAAWO,EAAA;AACjB,IAAAH,EAAa,kBAAkBA,EAAa,oBAAoB,MAAMP,GAAIG,GAAU,IAAM,EAAK;AAAA,EACjG;AACF,GAGaQ,IAAyB,CACpCX,GACAG,MACG;AACH,QAAM,EAAE,MAAMI,EAAA,IAAiBC,EAAA;AAC/B,MAAIL;AACF,eAAWS,KAAQT;AACjB,MAAAI,EAAa,kBAAkBK,GAAMZ,GAAIG,EAASS,CAAI,GAAG,IAAM,EAAI;AAGzE;"}