@gusto/embedded-react-sdk 0.13.0 → 0.13.1

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 (183) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/_virtual/dynamic-import-helper.js +8 -1
  3. package/dist/_virtual/dynamic-import-helper.js.map +1 -1
  4. package/dist/components/Base/Base.js +4 -4
  5. package/dist/components/Common/FieldDescription/FieldDescription.js +7 -14
  6. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
  7. package/dist/components/Common/Fields/hooks/useField.d.ts +4 -1
  8. package/dist/components/Common/Fields/hooks/useField.js +31 -24
  9. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureForm.js +3 -4
  11. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureFormActions.js +6 -7
  13. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  14. package/dist/components/Common/SignatureForm/SignatureFormFields.js +7 -8
  15. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  16. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +1 -1
  17. package/dist/components/Common/UI/DatePicker/DatePicker.js +1 -1
  18. package/dist/components/Common/UI/Tabs/Tabs.d.ts +7 -0
  19. package/dist/components/Common/UI/Tabs/Tabs.js +25 -0
  20. package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -0
  21. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +8 -0
  22. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js.map +1 -0
  23. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +51 -0
  24. package/dist/components/Common/UI/Tabs/index.d.ts +3 -0
  25. package/dist/components/Common/hooks/useNumberFormatter.js +1 -1
  26. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
  27. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -8
  29. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +8 -3
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +9 -10
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
  37. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  38. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +8 -3
  39. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  40. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +10 -5
  41. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  42. package/dist/components/Company/BankAccount/BankAccount.js +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +2 -2
  44. package/dist/components/Company/BankAccount/BankAccountForm/context.js +8 -3
  45. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  46. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +2 -2
  48. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -11
  49. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  50. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +8 -3
  51. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  52. package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
  53. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -10
  54. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  55. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +8 -3
  56. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  57. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -16
  58. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  59. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  60. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +14 -9
  61. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  62. package/dist/components/Company/Industry/Context.js +11 -6
  63. package/dist/components/Company/Industry/Context.js.map +1 -1
  64. package/dist/components/Company/Industry/Industry.js +2 -2
  65. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  66. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  67. package/dist/components/Company/Locations/LocationForm/LocationForm.js +13 -14
  68. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  69. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +8 -3
  70. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  71. package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -8
  72. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  73. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +8 -3
  74. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  75. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -4
  76. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  77. package/dist/components/Company/OnboardingOverview/context.js +8 -3
  78. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  79. package/dist/components/Company/PaySchedule/PaySchedule.js +37 -38
  80. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  81. package/dist/components/Company/PaySchedule/_parts/Edit.js +2 -3
  82. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  83. package/dist/components/Company/PaySchedule/usePaySchedule.js +11 -6
  84. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  85. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +3 -3
  86. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +8 -3
  87. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  88. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
  89. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +8 -3
  90. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  91. package/dist/components/Contractor/Address/Address.js +7 -8
  92. package/dist/components/Contractor/Address/Address.js.map +1 -1
  93. package/dist/components/Contractor/Address/Form.js +2 -3
  94. package/dist/components/Contractor/Address/Form.js.map +1 -1
  95. package/dist/components/Contractor/Address/useAddress.js +10 -5
  96. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  97. package/dist/components/Contractor/ContractorList/index.js +1 -1
  98. package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
  99. package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -3
  100. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +7 -7
  101. package/dist/components/Contractor/Profile/ContractorProfile.js +1 -1
  102. package/dist/components/Contractor/Profile/useContractorProfile.js +39 -34
  103. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  104. package/dist/components/Contractor/Submit/Submit.js +3 -3
  105. package/dist/components/Employee/Compensation/Compensation.js +10 -10
  106. package/dist/components/Employee/Deductions/Deductions.js +1 -1
  107. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +4 -4
  108. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +2 -2
  109. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +1 -1
  110. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +8 -9
  111. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  112. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +8 -3
  113. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  114. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +12 -13
  115. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  116. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +8 -3
  117. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  118. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -4
  119. package/dist/components/Employee/EmployeeList/useEmployeeList.js +8 -3
  120. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  121. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +3 -3
  122. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +8 -3
  123. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  124. package/dist/components/Employee/Landing/Landing.js +2 -2
  125. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +2 -2
  126. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +8 -8
  127. package/dist/components/Employee/PaymentMethod/Split.js +1 -1
  128. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +14 -9
  129. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  130. package/dist/components/Employee/Profile/HomeAddress.js +4 -5
  131. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  132. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +20 -21
  133. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  134. package/dist/components/Employee/Profile/Profile.js +13 -13
  135. package/dist/components/Employee/Profile/useProfile.js +8 -3
  136. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  137. package/dist/components/Employee/StateTaxes/StateTaxes.js +3 -3
  138. package/dist/components/Employee/StateTaxes/useStateTaxes.js +8 -3
  139. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  140. package/dist/components/Employee/Taxes/Taxes.js +5 -5
  141. package/dist/components/Employee/Taxes/useTaxes.js +8 -3
  142. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  143. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +60 -65
  144. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  145. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +60 -57
  146. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  147. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +5 -2
  148. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +64 -13
  149. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  150. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +18 -2
  151. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +117 -19
  152. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  153. package/dist/components/Payroll/PayrollList/PayrollList.js +3 -3
  154. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +8 -8
  155. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  156. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +1 -1
  157. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +42 -36
  158. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  159. package/dist/components/Payroll/helpers.d.ts +7 -6
  160. package/dist/components/Payroll/helpers.js +44 -43
  161. package/dist/components/Payroll/helpers.js.map +1 -1
  162. package/dist/components/Payroll/usePreparedPayrollData.d.ts +14 -0
  163. package/dist/components/Payroll/usePreparedPayrollData.js +39 -0
  164. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -0
  165. package/dist/contexts/ApiProvider/ApiProvider.js +4 -4
  166. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +28 -26
  167. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  168. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  169. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  170. package/dist/i18n/I18n.js +5 -5
  171. package/dist/i18n/I18n.js.map +1 -1
  172. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +20 -18
  173. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  174. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -0
  175. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -0
  176. package/dist/i18n/en/Payroll.PayrollOverview.json.js +18 -0
  177. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -0
  178. package/dist/shared/constants.d.ts +6 -0
  179. package/dist/shared/constants.js +43 -34
  180. package/dist/shared/constants.js.map +1 -1
  181. package/dist/style.css +1 -1
  182. package/dist/types/i18next.d.ts +52 -1
  183. package/package.json +14 -13
@@ -0,0 +1,39 @@
1
+ import { useState as n, useCallback as P, useEffect as c } from "react";
2
+ import { usePayrollsPrepareMutation as y } from "@gusto/embedded-api/react-query/payrollsPrepare";
3
+ import { usePaySchedulesGet as h } from "@gusto/embedded-api/react-query/paySchedulesGet";
4
+ const m = ({
5
+ companyId: e,
6
+ payrollId: l
7
+ }) => {
8
+ const { mutateAsync: o, isPending: t } = y(), [a, s] = n(), { data: d, isLoading: u } = h(
9
+ {
10
+ companyId: e,
11
+ payScheduleId: a?.payPeriod?.payScheduleUuid || ""
12
+ },
13
+ {
14
+ enabled: !!a?.payPeriod?.payScheduleUuid
15
+ }
16
+ ), r = P(async () => {
17
+ const p = await o({
18
+ request: {
19
+ companyId: e,
20
+ payrollId: l
21
+ }
22
+ });
23
+ s(p.payrollPrepared);
24
+ }, [e, l, o]);
25
+ c(() => {
26
+ r();
27
+ }, [r]);
28
+ const i = t || u;
29
+ return {
30
+ handlePreparePayroll: r,
31
+ preparedPayroll: a,
32
+ paySchedule: d?.payScheduleObject,
33
+ isLoading: i
34
+ };
35
+ };
36
+ export {
37
+ m as usePreparedPayrollData
38
+ };
39
+ //# sourceMappingURL=usePreparedPayrollData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreparedPayrollData.js","sources":["../../../src/components/Payroll/usePreparedPayrollData.ts"],"sourcesContent":["import { useState, useEffect, useCallback } from 'react'\nimport { usePayrollsPrepareMutation } from '@gusto/embedded-api/react-query/payrollsPrepare'\nimport { usePaySchedulesGet } from '@gusto/embedded-api/react-query/paySchedulesGet'\nimport type { PayrollPrepared } from '@gusto/embedded-api/models/components/payrollprepared'\nimport type { PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleobject'\n\ninterface UsePreparedPayrollDataParams {\n companyId: string\n payrollId: string\n}\n\ninterface UsePreparedPayrollDataReturn {\n handlePreparePayroll: () => Promise<void>\n preparedPayroll: PayrollPrepared | undefined\n paySchedule: PayScheduleObject | undefined\n isLoading: boolean\n}\n\nexport const usePreparedPayrollData = ({\n companyId,\n payrollId,\n}: UsePreparedPayrollDataParams): UsePreparedPayrollDataReturn => {\n const { mutateAsync: preparePayroll, isPending: isPreparePayrollPending } =\n usePayrollsPrepareMutation()\n const [preparedPayroll, setPreparedPayroll] = useState<PayrollPrepared | undefined>()\n\n const { data: payScheduleData, isLoading: isPayScheduleLoading } = usePaySchedulesGet(\n {\n companyId,\n payScheduleId: preparedPayroll?.payPeriod?.payScheduleUuid || '',\n },\n {\n enabled: Boolean(preparedPayroll?.payPeriod?.payScheduleUuid),\n },\n )\n\n const handlePreparePayroll = useCallback(async () => {\n const result = await preparePayroll({\n request: {\n companyId,\n payrollId,\n },\n })\n setPreparedPayroll(result.payrollPrepared)\n }, [companyId, payrollId, preparePayroll])\n\n useEffect(() => {\n void handlePreparePayroll()\n }, [handlePreparePayroll])\n\n const isLoading = isPreparePayrollPending || isPayScheduleLoading\n\n return {\n handlePreparePayroll,\n preparedPayroll,\n paySchedule: payScheduleData?.payScheduleObject,\n isLoading,\n }\n}\n"],"names":["usePreparedPayrollData","companyId","payrollId","preparePayroll","isPreparePayrollPending","usePayrollsPrepareMutation","preparedPayroll","setPreparedPayroll","useState","payScheduleData","isPayScheduleLoading","usePaySchedulesGet","handlePreparePayroll","useCallback","result","useEffect","isLoading"],"mappings":";;;AAkBO,MAAMA,IAAyB,CAAC;AAAA,EACrC,WAAAC;AAAA,EACA,WAAAC;AACF,MAAkE;AAChE,QAAM,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAC9CC,EAAA,GACI,CAACC,GAAiBC,CAAkB,IAAIC,EAAA,GAExC,EAAE,MAAMC,GAAiB,WAAWC,MAAyBC;AAAA,IACjE;AAAA,MACE,WAAAV;AAAA,MACA,eAAeK,GAAiB,WAAW,mBAAmB;AAAA,IAAA;AAAA,IAEhE;AAAA,MACE,SAAS,EAAQA,GAAiB,WAAW;AAAA,IAAe;AAAA,EAC9D,GAGIM,IAAuBC,EAAY,YAAY;AACnD,UAAMC,IAAS,MAAMX,EAAe;AAAA,MAClC,SAAS;AAAA,QACP,WAAAF;AAAA,QACA,WAAAC;AAAA,MAAA;AAAA,IACF,CACD;AACD,IAAAK,EAAmBO,EAAO,eAAe;AAAA,EAC3C,GAAG,CAACb,GAAWC,GAAWC,CAAc,CAAC;AAEzC,EAAAY,EAAU,MAAM;AACd,IAAKH,EAAA;AAAA,EACP,GAAG,CAACA,CAAoB,CAAC;AAEzB,QAAMI,IAAYZ,KAA2BM;AAE7C,SAAO;AAAA,IACL,sBAAAE;AAAA,IACA,iBAAAN;AAAA,IACA,aAAaG,GAAiB;AAAA,IAC9B,WAAAO;AAAA,EAAA;AAEJ;"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { QueryClient as p, QueryClientProvider as E } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@tanstack/react-query/build/modern/index.js";
3
- import { GustoEmbeddedProvider as H } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/_context.js";
4
- import { GustoEmbeddedCore as b } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/core.js";
5
- import { SDKHooks as R } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/hooks/hooks.js";
2
+ import { QueryClient as p, QueryClientProvider as E } from "@tanstack/react-query";
3
+ import { GustoEmbeddedProvider as H } from "@gusto/embedded-api/react-query/_context";
4
+ import { GustoEmbeddedCore as b } from "@gusto/embedded-api/core";
5
+ import { SDKHooks as R } from "@gusto/embedded-api/hooks/hooks";
6
6
  import { useMemo as a } from "react";
7
7
  function Q({ url: i, headers: s, hooks: e, children: u }) {
8
8
  const d = a(() => {
@@ -5,51 +5,53 @@ import { CheckboxGroup as e } from "../../../components/Common/UI/CheckboxGroup/
5
5
  import { ComboBox as i } from "../../../components/Common/UI/ComboBox/ComboBox.js";
6
6
  import { Checkbox as p } from "../../../components/Common/UI/Checkbox/Checkbox.js";
7
7
  import { DatePicker as f } from "../../../components/Common/UI/DatePicker/DatePicker.js";
8
- import { Radio as n } from "../../../components/Common/UI/Radio/Radio.js";
9
- import { RadioGroup as a } from "../../../components/Common/UI/RadioGroup/RadioGroup.js";
8
+ import { Radio as a } from "../../../components/Common/UI/Radio/Radio.js";
9
+ import { RadioGroup as n } from "../../../components/Common/UI/RadioGroup/RadioGroup.js";
10
10
  import { Select as d } from "../../../components/Common/UI/Select/Select.js";
11
11
  import { Switch as u } from "../../../components/Common/UI/Switch/Switch.js";
12
12
  import { Button as c } from "../../../components/Common/UI/Button/Button.js";
13
- import { ButtonIcon as x } from "../../../components/Common/UI/Button/ButtonIcon.js";
14
- import { Alert as s } from "../../../components/Common/UI/Alert/Alert.js";
15
- import { Card as C } from "../../../components/Common/UI/Card/Card.js";
16
- import { Badge as b } from "../../../components/Common/UI/Badge/Badge.js";
13
+ import { ButtonIcon as s } from "../../../components/Common/UI/Button/ButtonIcon.js";
14
+ import { Alert as b } from "../../../components/Common/UI/Alert/Alert.js";
15
+ import { Card as x } from "../../../components/Common/UI/Card/Card.js";
16
+ import { Badge as C } from "../../../components/Common/UI/Badge/Badge.js";
17
17
  import { Link as B } from "../../../components/Common/UI/Link/Link.js";
18
18
  import { Menu as l } from "../../../components/Common/UI/Menu/Menu.js";
19
19
  import { Table as k } from "../../../components/Common/UI/Table/Table.js";
20
- import { OrderedList as g } from "../../../components/Common/UI/List/OrderedList.js";
21
- import { UnorderedList as h } from "../../../components/Common/UI/List/UnorderedList.js";
22
- import { Heading as I } from "../../../components/Common/UI/Heading/Heading.js";
23
- import { Text as L } from "../../../components/Common/UI/Text/Text.js";
24
- import { CalendarPreview as P } from "../../../components/Common/UI/CalendarPreview/CalendarPreview.js";
25
- import { ProgressBar as T } from "../../../components/Common/UI/ProgressBar/ProgressBar.js";
26
- const Z = {
27
- Alert: (o) => /* @__PURE__ */ r(s, { ...o }),
28
- Badge: (o) => /* @__PURE__ */ r(b, { ...o }),
20
+ import { OrderedList as T } from "../../../components/Common/UI/List/OrderedList.js";
21
+ import { UnorderedList as g } from "../../../components/Common/UI/List/UnorderedList.js";
22
+ import { Heading as h } from "../../../components/Common/UI/Heading/Heading.js";
23
+ import { Text as I } from "../../../components/Common/UI/Text/Text.js";
24
+ import { CalendarPreview as L } from "../../../components/Common/UI/CalendarPreview/CalendarPreview.js";
25
+ import { ProgressBar as P } from "../../../components/Common/UI/ProgressBar/ProgressBar.js";
26
+ import { Tabs as w } from "../../../components/Common/UI/Tabs/Tabs.js";
27
+ const $ = {
28
+ Alert: (o) => /* @__PURE__ */ r(b, { ...o }),
29
+ Badge: (o) => /* @__PURE__ */ r(C, { ...o }),
29
30
  Button: (o) => /* @__PURE__ */ r(c, { ...o }),
30
- ButtonIcon: (o) => /* @__PURE__ */ r(x, { ...o }),
31
- Card: (o) => /* @__PURE__ */ r(C, { ...o }),
31
+ ButtonIcon: (o) => /* @__PURE__ */ r(s, { ...o }),
32
+ Card: (o) => /* @__PURE__ */ r(x, { ...o }),
32
33
  TextInput: (o) => /* @__PURE__ */ r(t, { ...o }),
33
34
  Checkbox: (o) => /* @__PURE__ */ r(p, { ...o }),
34
35
  CheckboxGroup: (o) => /* @__PURE__ */ r(e, { ...o }),
35
36
  ComboBox: (o) => /* @__PURE__ */ r(i, { ...o }),
36
37
  DatePicker: (o) => /* @__PURE__ */ r(f, { ...o }),
37
- OrderedList: (o) => /* @__PURE__ */ r(g, { ...o }),
38
- UnorderedList: (o) => /* @__PURE__ */ r(h, { ...o }),
38
+ OrderedList: (o) => /* @__PURE__ */ r(T, { ...o }),
39
+ UnorderedList: (o) => /* @__PURE__ */ r(g, { ...o }),
39
40
  NumberInput: (o) => /* @__PURE__ */ r(m, { ...o }),
40
- Radio: (o) => /* @__PURE__ */ r(n, { ...o }),
41
- RadioGroup: (o) => /* @__PURE__ */ r(a, { ...o }),
41
+ Radio: (o) => /* @__PURE__ */ r(a, { ...o }),
42
+ RadioGroup: (o) => /* @__PURE__ */ r(n, { ...o }),
42
43
  Select: (o) => /* @__PURE__ */ r(d, { ...o }),
43
44
  Switch: (o) => /* @__PURE__ */ r(u, { ...o }),
44
45
  Link: (o) => /* @__PURE__ */ r(B, { ...o }),
45
46
  Menu: (o) => /* @__PURE__ */ r(l, { ...o }),
46
47
  Table: (o) => /* @__PURE__ */ r(k, { ...o }),
47
- Heading: (o) => /* @__PURE__ */ r(I, { ...o }),
48
- Text: (o) => /* @__PURE__ */ r(L, { ...o }),
49
- CalendarPreview: (o) => /* @__PURE__ */ r(P, { ...o }),
50
- ProgressBar: (o) => /* @__PURE__ */ r(T, { ...o })
48
+ Heading: (o) => /* @__PURE__ */ r(h, { ...o }),
49
+ Text: (o) => /* @__PURE__ */ r(I, { ...o }),
50
+ CalendarPreview: (o) => /* @__PURE__ */ r(L, { ...o }),
51
+ ProgressBar: (o) => /* @__PURE__ */ r(P, { ...o }),
52
+ Tabs: (o) => /* @__PURE__ */ r(w, { ...o })
51
53
  };
52
54
  export {
53
- Z as defaultComponents
55
+ $ as defaultComponents
54
56
  };
55
57
  //# sourceMappingURL=defaultComponentAdapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\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;"}
@@ -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;"}
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/common.json": () => import("./en/common.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,i4GAAA,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,29 +1,31 @@
1
- const e = "Run payroll for {{startDate}} - {{endDate}}", a = "Regular payroll", o = "Calculate payroll", t = "Calculate payroll", n = "Hours and additional earnings", l = "Review and update your employee's hours, reimbursements, and additional earnings below.", s = "Employee compensations", i = { employees: "Employees", hours: "Hours", timeOff: "Time off", additionalEarnings: "Additional earnings", reimbursements: "Reimbursements", totalPay: "Total pay" }, r = "Skipped", c = { edit: "Edit" }, u = "Back", d = "Back", p = {
1
+ const e = "Run payroll for {{startDate}} - {{endDate}}", o = "Regular payroll", l = "Calculate payroll", a = "Calculate payroll", t = "Hours and additional earnings", n = "Review and update your employee's hours, reimbursements, and additional earnings below.", s = "Employee compensations", i = { employees: "Employees", hours: "Hours", timeOff: "Time off", additionalEarnings: "Additional earnings", reimbursements: "Reimbursements", totalPay: "Total pay" }, r = "Skipped", d = { edit: "Edit" }, p = "Back", c = "Back", y = { payrollDeadline: { label: "Payroll Deadline", message: "To pay your employees with direct deposit on the check date, you'll need to run payroll by the deadline." }, skippedEmployees: { label: "Skipped Employees", employeeAddressNotVerified: "Employee address not verified" } }, u = {
2
2
  pageTitle: e,
3
- regularPayroll: a,
4
- calculatePayroll: o,
5
- calculatePayrollTitle: t,
6
- hoursAndEarningsTitle: n,
7
- hoursAndEarningsDescription: l,
3
+ regularPayroll: o,
4
+ calculatePayroll: l,
5
+ calculatePayrollTitle: a,
6
+ hoursAndEarningsTitle: t,
7
+ hoursAndEarningsDescription: n,
8
8
  employeeCompensationsTitle: s,
9
9
  tableColumns: i,
10
10
  skippedBadge: r,
11
- editMenu: c,
12
- backButton: u,
13
- backButtonTitle: d
11
+ editMenu: d,
12
+ backButton: p,
13
+ backButtonTitle: c,
14
+ alerts: y
14
15
  };
15
16
  export {
16
- u as backButton,
17
- d as backButtonTitle,
18
- o as calculatePayroll,
19
- t as calculatePayrollTitle,
20
- p as default,
21
- c as editMenu,
17
+ y as alerts,
18
+ p as backButton,
19
+ c as backButtonTitle,
20
+ l as calculatePayroll,
21
+ a as calculatePayrollTitle,
22
+ u as default,
23
+ d as editMenu,
22
24
  s as employeeCompensationsTitle,
23
- l as hoursAndEarningsDescription,
24
- n as hoursAndEarningsTitle,
25
+ n as hoursAndEarningsDescription,
26
+ t as hoursAndEarningsTitle,
25
27
  e as pageTitle,
26
- a as regularPayroll,
28
+ o as regularPayroll,
27
29
  r as skippedBadge,
28
30
  i as tableColumns
29
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Payroll.PayrollConfiguration.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Payroll.PayrollConfiguration.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -0,0 +1,20 @@
1
+ const e = "Edit {{employeeName}}'s payroll", o = "Gross pay (excluding reimbursements)", s = "Regular hours", t = "Hours", r = "Save", l = "Cancel", a = { regularHours: "Regular Hours", overtime: "Overtime", doubleOvertime: "Double overtime" }, n = {
2
+ pageTitle: e,
3
+ grossPayLabel: o,
4
+ regularHoursTitle: s,
5
+ hoursUnit: t,
6
+ saveButton: r,
7
+ cancelButton: l,
8
+ compensationNames: a
9
+ };
10
+ export {
11
+ l as cancelButton,
12
+ a as compensationNames,
13
+ n as default,
14
+ o as grossPayLabel,
15
+ t as hoursUnit,
16
+ e as pageTitle,
17
+ s as regularHoursTitle,
18
+ r as saveButton
19
+ };
20
+ //# sourceMappingURL=Payroll.PayrollEditEmployee.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payroll.PayrollEditEmployee.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,18 @@
1
+ const e = "Review payroll for {{startDate}} - {{endDate}}", t = { edit: "Edit", editTitle: "Edit", submit: "Submit", submitTitle: "Submit" }, o = { progressSaved: "Your progress has been saved", directDepositDeadline: "To pay your employees with direct deposit on {{payDate}}, you'll need to run payroll by {{deadline}}", missedDeadlineWarning: "If you miss this deadline, your employees' direct deposit will be delayed." }, s = { payrollSummary: "Payroll Summary" }, a = { summary: "Summary", configuration: "Configuration" }, i = { totalPayroll: "Total payroll", debitAmount: "Debit amount", employees: "Employees", grossPay: "Gross Pay", reimbursements: "Reimbursements" }, l = {
2
+ pageTitle: e,
3
+ buttons: t,
4
+ alerts: o,
5
+ sections: s,
6
+ dataViews: a,
7
+ tableHeaders: i
8
+ };
9
+ export {
10
+ o as alerts,
11
+ t as buttons,
12
+ a as dataViews,
13
+ l as default,
14
+ e as pageTitle,
15
+ s as sections,
16
+ i as tableHeaders
17
+ };
18
+ //# sourceMappingURL=Payroll.PayrollOverview.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payroll.PayrollOverview.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -117,6 +117,7 @@ export declare const runPayrollEvents: {
117
117
  readonly RUN_PAYROLL_EDITED: "runPayroll/edited";
118
118
  readonly RUN_PAYROLL_EMPLOYEE_EDITED: "runPayroll/employee/edited";
119
119
  readonly RUN_PAYROLL_EMPLOYEE_SAVED: "runPayroll/employee/saved";
120
+ readonly RUN_PAYROLL_EMPLOYEE_CANCELLED: "runPayroll/employee/cancelled";
120
121
  readonly RUN_PAYROLL_SELECTED: "runPayroll/selected";
121
122
  readonly RUN_PAYROLL_SUBMITTED: "runPayroll/submitted";
122
123
  };
@@ -126,6 +127,7 @@ export declare const componentEvents: {
126
127
  readonly RUN_PAYROLL_EDITED: "runPayroll/edited";
127
128
  readonly RUN_PAYROLL_EMPLOYEE_EDITED: "runPayroll/employee/edited";
128
129
  readonly RUN_PAYROLL_EMPLOYEE_SAVED: "runPayroll/employee/saved";
130
+ readonly RUN_PAYROLL_EMPLOYEE_CANCELLED: "runPayroll/employee/cancelled";
129
131
  readonly RUN_PAYROLL_SELECTED: "runPayroll/selected";
130
132
  readonly RUN_PAYROLL_SUBMITTED: "runPayroll/submitted";
131
133
  readonly CONTRACTOR_ADDRESS_UPDATED: "contractor/address/updated";
@@ -318,3 +320,7 @@ export declare const CONTRACTOR_TYPE: {
318
320
  readonly BUSINESS: "Business";
319
321
  readonly INDIVIDUAL: "Individual";
320
322
  };
323
+ export declare const COMPENSATION_NAME_REGULAR_HOURS = "Regular Hours";
324
+ export declare const COMPENSATION_NAME_OVERTIME = "Overtime";
325
+ export declare const COMPENSATION_NAME_DOUBLE_OVERTIME = "Double overtime";
326
+ export declare const HOURS_COMPENSATION_NAMES: string[];
@@ -1,6 +1,6 @@
1
- import { OnboardingStatus as E } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/models/operations/putv1employeesemployeeidonboardingstatus.js";
2
- import { ContractorOnboardingStatus1 as e } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/models/components/contractor.js";
3
- const n = {
1
+ import { OnboardingStatus as E } from "@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus";
2
+ import { ContractorOnboardingStatus1 as e } from "@gusto/embedded-api/models/components/contractor";
3
+ const A = {
4
4
  EMPLOYEE_CREATE: "employee/create",
5
5
  EMPLOYEE_CREATED: "employee/created",
6
6
  EMPLOYEE_UPDATE: "employee/update",
@@ -49,7 +49,7 @@ const n = {
49
49
  EMPLOYEE_SIGN_FORM: "employee/forms/sign",
50
50
  EMPLOYEE_FORMS_DONE: "employee/forms/done",
51
51
  EMPLOYEE_ONBOARDING_STATUS_UPDATED: "employee/onboardingStatus/updated"
52
- }, A = {
52
+ }, n = {
53
53
  COMPANY_INDUSTRY: "company/industry",
54
54
  COMPANY_INDUSTRY_SELECTED: "company/industry/selected",
55
55
  COMPANY_FEDERAL_TAXES_UPDATED: "company/federalTaxes/updated",
@@ -115,15 +115,16 @@ const n = {
115
115
  RUN_PAYROLL_EDITED: "runPayroll/edited",
116
116
  RUN_PAYROLL_EMPLOYEE_EDITED: "runPayroll/employee/edited",
117
117
  RUN_PAYROLL_EMPLOYEE_SAVED: "runPayroll/employee/saved",
118
+ RUN_PAYROLL_EMPLOYEE_CANCELLED: "runPayroll/employee/cancelled",
118
119
  RUN_PAYROLL_SELECTED: "runPayroll/selected",
119
120
  RUN_PAYROLL_SUBMITTED: "runPayroll/submitted"
120
- }, d = {
121
+ }, r = {
121
122
  ROBOT_MACHINE_DONE: "done",
122
123
  //This is internal Robot event thrown when machine transitions to final state
123
124
  ERROR: "ERROR",
124
125
  CANCEL: "CANCEL",
125
- ...n,
126
126
  ...A,
127
+ ...n,
127
128
  ...t,
128
129
  ...N,
129
130
  ...T
@@ -136,7 +137,7 @@ const n = {
136
137
  SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE: E.SelfOnboardingCompletedByEmployee,
137
138
  SELF_ONBOARDING_AWAITING_ADMIN_REVIEW: E.SelfOnboardingAwaitingAdminReview,
138
139
  ONBOARDING_COMPLETED: E.OnboardingCompleted
139
- }, R = /* @__PURE__ */ new Set([
140
+ }, C = /* @__PURE__ */ new Set([
140
141
  o.SELF_ONBOARDING_INVITED,
141
142
  o.SELF_ONBOARDING_INVITED_STARTED,
142
143
  o.SELF_ONBOARDING_INVITED_OVERDUE
@@ -148,20 +149,20 @@ const n = {
148
149
  SELF_ONBOARDING_STARTED: e.SelfOnboardingStarted,
149
150
  SELF_ONBOARDING_REVIEW: e.SelfOnboardingReview,
150
151
  ONBOARDING_COMPLETED: e.OnboardingCompleted
151
- }, c = /* @__PURE__ */ new Set([
152
+ }, P = /* @__PURE__ */ new Set([
152
153
  O.SELF_ONBOARDING_NOT_INVITED,
153
154
  O.SELF_ONBOARDING_INVITED,
154
155
  O.SELF_ONBOARDING_STARTED,
155
156
  O.SELF_ONBOARDING_REVIEW,
156
157
  O.ADMIN_ONBOARDING_REVIEW
157
- ]), r = {
158
+ ]), I = {
158
159
  EXEMPT: "Exempt",
159
160
  SALARIED_NONEXEMPT: "Salaried Nonexempt",
160
161
  NONEXEMPT: "Nonexempt",
161
162
  OWNER: "Owner",
162
163
  COMMISSION_ONLY_EXEMPT: "Commission Only Exempt",
163
164
  COMMISSION_ONLY_NONEXEMPT: "Commission Only Nonexempt"
164
- }, C = 43888, P = 40, I = 173.333333, S = 2080, M = [
165
+ }, S = 43888, M = 40, p = 173.333333, L = 2080, s = [
165
166
  "AL",
166
167
  "AK",
167
168
  "AZ",
@@ -212,7 +213,7 @@ const n = {
212
213
  "WV",
213
214
  "WI",
214
215
  "WY"
215
- ], p = {
216
+ ], m = {
216
217
  OWNER: "owner",
217
218
  PRESIDENT: "president",
218
219
  VICE_PRESIDENT: "vice_president",
@@ -220,7 +221,7 @@ const n = {
220
221
  CORPORATE_OFFICER: "corporate_officer",
221
222
  PARTNER: "partner",
222
223
  MEMBER: "member"
223
- }, m = {
224
+ }, Y = {
224
225
  HOUR: "Hour",
225
226
  WEEK: "Week",
226
227
  MONTH: "Month",
@@ -231,42 +232,50 @@ const n = {
231
232
  SMALL: "small",
232
233
  MEDIUM: "medium",
233
234
  LARGE: "large"
234
- }, s = {
235
+ }, l = {
235
236
  [_.BASE]: "0rem",
236
237
  [_.SMALL]: "40rem",
237
238
  [_.MEDIUM]: "48rem",
238
239
  [_.LARGE]: "64rem"
239
- }, L = {
240
+ }, i = {
240
241
  check: "Check",
241
242
  directDeposit: "Direct Deposit"
242
- }, Y = {
243
+ }, y = {
243
244
  percentage: "Percentage",
244
245
  amount: "Amount"
245
- }, l = {
246
+ }, u = {
246
247
  BUSINESS: "Business"
247
- };
248
+ }, a = "Regular Hours", D = "Overtime", d = "Double overtime", U = [
249
+ a,
250
+ D,
251
+ d
252
+ ];
248
253
  export {
249
254
  _ as BREAKPOINTS,
250
- s as BREAKPOINTS_VALUES,
251
- l as CONTRACTOR_TYPE,
255
+ l as BREAKPOINTS_VALUES,
256
+ d as COMPENSATION_NAME_DOUBLE_OVERTIME,
257
+ D as COMPENSATION_NAME_OVERTIME,
258
+ a as COMPENSATION_NAME_REGULAR_HOURS,
259
+ u as CONTRACTOR_TYPE,
252
260
  O as ContractorOnboardingStatus,
253
- c as ContractorSelfOnboardingStatuses,
261
+ P as ContractorSelfOnboardingStatuses,
254
262
  o as EmployeeOnboardingStatus,
255
- R as EmployeeSelfOnboardingStatuses,
256
- C as FLSA_OVERTIME_SALARY_LIMIT,
257
- r as FlsaStatus,
258
- S as HOURS_PER_PAY_PERIOD_ANNUALLY,
259
- I as HOURS_PER_PAY_PERIOD_MONTHLY,
260
- P as HOURS_PER_PAY_PERIOD_WEEKLY,
261
- L as PAYMENT_METHODS,
262
- m as PAY_PERIODS,
263
- p as SIGNATORY_TITLES,
264
- Y as SPLIT_BY,
265
- M as STATES_ABBR,
266
- A as companyEvents,
267
- d as componentEvents,
263
+ C as EmployeeSelfOnboardingStatuses,
264
+ S as FLSA_OVERTIME_SALARY_LIMIT,
265
+ I as FlsaStatus,
266
+ U as HOURS_COMPENSATION_NAMES,
267
+ L as HOURS_PER_PAY_PERIOD_ANNUALLY,
268
+ p as HOURS_PER_PAY_PERIOD_MONTHLY,
269
+ M as HOURS_PER_PAY_PERIOD_WEEKLY,
270
+ i as PAYMENT_METHODS,
271
+ Y as PAY_PERIODS,
272
+ m as SIGNATORY_TITLES,
273
+ y as SPLIT_BY,
274
+ s as STATES_ABBR,
275
+ n as companyEvents,
276
+ r as componentEvents,
268
277
  N as contractorEvents,
269
- n as employeeEvents,
278
+ A as employeeEvents,
270
279
  t as payScheduleEvents,
271
280
  T as runPayrollEvents
272
281
  };