@gusto/embedded-react-sdk 0.12.1 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +133 -0
- package/dist/_virtual/dynamic-import-helper.js +1 -8
- package/dist/_virtual/dynamic-import-helper.js.map +1 -1
- package/dist/components/Base/Base.js +23 -22
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/ReorderableList/DropZone.js +1 -1
- package/dist/components/Common/ReorderableList/DropZone.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +7 -5
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +12 -10
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +8 -6
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +1 -1
- package/dist/components/Common/hooks/useNumberFormatter.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +5 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +4 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +8 -7
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -10
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +2 -2
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -8
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +2 -2
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -8
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -5
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -8
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +9 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +10 -9
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +6 -4
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -16
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -5
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -11
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +12 -10
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Industry/Industry.js +2 -2
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +8 -7
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -8
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +4 -2
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +10 -9
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -8
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +8 -6
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +4 -3
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -8
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +9 -8
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +12 -10
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +14 -14
- package/dist/components/Company/PaySchedule/_parts/Head.js +8 -6
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +7 -11
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +9 -8
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -10
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +26 -25
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +20 -19
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +7 -5
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +87 -85
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +36 -40
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +7 -6
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +6 -5
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +10 -10
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +15 -14
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +25 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Compensation/useCompensation.js +1 -1
- package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.js +1 -1
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +15 -14
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +10 -9
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +12 -11
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +8 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -10
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -8
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -4
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +7 -6
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +7 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +15 -14
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -8
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.d.ts +1 -0
- package/dist/components/Employee/FederalTaxes/Actions.js +15 -0
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +29 -0
- package/dist/components/Employee/FederalTaxes/FederalForm.js +110 -0
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/FederalTaxes.d.ts +6 -0
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +72 -0
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/Head.d.ts +1 -0
- package/dist/components/Employee/FederalTaxes/Head.js +24 -0
- package/dist/components/Employee/FederalTaxes/Head.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/index.d.ts +2 -0
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.d.ts +5 -0
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +16 -0
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -0
- package/dist/components/Employee/Landing/Landing.js +15 -14
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +1 -19
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +22 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +18 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -0
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.d.ts +2 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +72 -63
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +9 -9
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +6 -5
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +10 -8
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +8 -8
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +12 -11
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +10 -14
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +9 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -9
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
- package/dist/components/Employee/Profile/Profile.js +13 -13
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -8
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +2 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +37 -24
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts +2 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +31 -19
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.d.ts +1 -0
- package/dist/components/Employee/StateTaxes/Actions.js +15 -0
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -0
- package/dist/components/Employee/StateTaxes/StateForm.d.ts +10 -0
- package/dist/components/Employee/StateTaxes/StateForm.js +34 -0
- package/dist/components/Employee/StateTaxes/StateForm.js.map +1 -0
- package/dist/components/Employee/StateTaxes/StateTaxes.d.ts +7 -0
- package/dist/components/Employee/StateTaxes/StateTaxes.js +90 -0
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -0
- package/dist/components/Employee/StateTaxes/index.d.ts +2 -0
- package/dist/components/Employee/StateTaxes/useStateTaxes.d.ts +8 -0
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +16 -0
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -0
- package/dist/components/Employee/Taxes/Actions.js +10 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +14 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.d.ts +5 -0
- package/dist/components/Employee/Taxes/Taxes.js +73 -85
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -8
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/index.d.ts +3 -1
- package/dist/components/Employee/index.js +16 -12
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +8 -6
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +12 -10
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +10 -8
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +11 -9
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.js +4 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +7 -5
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.js +7 -7
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +46 -0
- package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -0
- package/dist/i18n/en/Employee.StateTaxes.json.js +6 -10
- package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.Taxes.json.js +7 -7
- package/dist/shared/constants.d.ts +4 -2
- package/dist/shared/constants.js +10 -9
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +27 -4
- package/package.json +5 -6
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import "classnames";
|
|
4
|
+
import "../../../shared/constants.js";
|
|
5
|
+
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
import { HamburgerMenu as h } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
5
7
|
import p from "../../../assets/icons/pencil.svg.js";
|
|
6
8
|
import { DataView as y } from "../../Common/DataView/DataView.js";
|
|
7
|
-
const
|
|
9
|
+
const E = ({
|
|
8
10
|
employees: a,
|
|
9
11
|
onBack: d,
|
|
10
12
|
onEdit: c,
|
|
11
13
|
onCalculatePayroll: s
|
|
12
14
|
}) => {
|
|
13
|
-
const { Alert: n, Button: o, Heading: t, Text: l } =
|
|
15
|
+
const { Alert: n, Button: o, Heading: t, Text: l } = m();
|
|
14
16
|
return /* @__PURE__ */ i(r, { flexDirection: "column", children: [
|
|
15
17
|
/* @__PURE__ */ i(r, { justifyContent: "space-between", children: [
|
|
16
18
|
/* @__PURE__ */ e(t, { as: "h1", children: "Run payroll for Jul 5 - Jul 18, 2025" }),
|
|
@@ -52,7 +54,7 @@ const J = ({
|
|
|
52
54
|
],
|
|
53
55
|
data: a,
|
|
54
56
|
itemMenu: ({ employeeId: u }) => /* @__PURE__ */ e(
|
|
55
|
-
|
|
57
|
+
h,
|
|
56
58
|
{
|
|
57
59
|
items: [
|
|
58
60
|
{
|
|
@@ -73,6 +75,6 @@ const J = ({
|
|
|
73
75
|
] });
|
|
74
76
|
};
|
|
75
77
|
export {
|
|
76
|
-
|
|
78
|
+
E as PayrollConfigurationPresentation
|
|
77
79
|
};
|
|
78
80
|
//# sourceMappingURL=PayrollConfigurationPresentation.js.map
|
package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollConfigurationPresentation.js","sources":["../../../../src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.tsx"],"sourcesContent":["import { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\n//TODO: Use Speakeasy type\ninterface Employee {\n employeeId: string\n}\n\ninterface PayrollConfigurationPresentationProps {\n employees: Employee[]\n onBack: () => void\n onCalculatePayroll: () => void\n onEdit: (employee: Employee) => void\n}\n\nexport const PayrollConfigurationPresentation = ({\n employees,\n onBack,\n onEdit,\n onCalculatePayroll,\n}: PayrollConfigurationPresentationProps) => {\n const { Alert, Button, Heading, Text } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\">\n <Heading as=\"h1\">Run payroll for Jul 5 - Jul 18, 2025</Heading>\n <Button title=\"Calculate payroll\" onClick={onCalculatePayroll}>\n Calculate payroll\n </Button>\n </Flex>\n <Text>Regular payroll</Text>\n <Flex flexDirection=\"column\" alignItems=\"stretch\">\n <Alert\n label=\"To pay your employees with direct deposit on Fri, Jul 25, you'll need to run payroll by 7:00 PM EDT on Wed, Jul 23\"\n status=\"info\"\n >\n {\"If you miss this deadline, your employees' direct deposit will be delayed.\"}\n </Alert>\n <Alert label=\"2 employees will be skipped this payroll\" status=\"warning\">\n <ul>\n <li>John Smith - Employee address not verified</li>\n <li>Jensen Cooper - Employee address not verified</li>\n </ul>\n </Alert>\n </Flex>\n\n <Heading as=\"h3\">Hours and additional earnings</Heading>\n <Text>Review and update...</Text>\n <DataView\n label=\"Configuration\"\n columns={[\n {\n title: 'Employees',\n render: () => (\n <Flex flexDirection=\"column\">\n <Text>John Smith</Text>\n <Text>$22.00/hr</Text>\n </Flex>\n ),\n },\n {\n title: 'Hours',\n render: () => <Text>40</Text>,\n },\n ]}\n data={employees}\n itemMenu={({ employeeId }) => (\n <HamburgerMenu\n items={[\n {\n label: 'Edit',\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n onEdit({ employeeId })\n },\n },\n ]}\n triggerLabel=\"Edit\"\n isLoading={false}\n />\n )}\n />\n <Button title=\"Back\" onClick={onBack}>\n Back\n </Button>\n </Flex>\n )\n}\n"],"names":["PayrollConfigurationPresentation","employees","onBack","onEdit","onCalculatePayroll","Alert","Button","Heading","Text","useComponentContext","jsxs","Flex","jsx","DataView","employeeId","HamburgerMenu","PencilSvg"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PayrollConfigurationPresentation.js","sources":["../../../../src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.tsx"],"sourcesContent":["import { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\n//TODO: Use Speakeasy type\ninterface Employee {\n employeeId: string\n}\n\ninterface PayrollConfigurationPresentationProps {\n employees: Employee[]\n onBack: () => void\n onCalculatePayroll: () => void\n onEdit: (employee: Employee) => void\n}\n\nexport const PayrollConfigurationPresentation = ({\n employees,\n onBack,\n onEdit,\n onCalculatePayroll,\n}: PayrollConfigurationPresentationProps) => {\n const { Alert, Button, Heading, Text } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\">\n <Heading as=\"h1\">Run payroll for Jul 5 - Jul 18, 2025</Heading>\n <Button title=\"Calculate payroll\" onClick={onCalculatePayroll}>\n Calculate payroll\n </Button>\n </Flex>\n <Text>Regular payroll</Text>\n <Flex flexDirection=\"column\" alignItems=\"stretch\">\n <Alert\n label=\"To pay your employees with direct deposit on Fri, Jul 25, you'll need to run payroll by 7:00 PM EDT on Wed, Jul 23\"\n status=\"info\"\n >\n {\"If you miss this deadline, your employees' direct deposit will be delayed.\"}\n </Alert>\n <Alert label=\"2 employees will be skipped this payroll\" status=\"warning\">\n <ul>\n <li>John Smith - Employee address not verified</li>\n <li>Jensen Cooper - Employee address not verified</li>\n </ul>\n </Alert>\n </Flex>\n\n <Heading as=\"h3\">Hours and additional earnings</Heading>\n <Text>Review and update...</Text>\n <DataView\n label=\"Configuration\"\n columns={[\n {\n title: 'Employees',\n render: () => (\n <Flex flexDirection=\"column\">\n <Text>John Smith</Text>\n <Text>$22.00/hr</Text>\n </Flex>\n ),\n },\n {\n title: 'Hours',\n render: () => <Text>40</Text>,\n },\n ]}\n data={employees}\n itemMenu={({ employeeId }) => (\n <HamburgerMenu\n items={[\n {\n label: 'Edit',\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n onEdit({ employeeId })\n },\n },\n ]}\n triggerLabel=\"Edit\"\n isLoading={false}\n />\n )}\n />\n <Button title=\"Back\" onClick={onBack}>\n Back\n </Button>\n </Flex>\n )\n}\n"],"names":["PayrollConfigurationPresentation","employees","onBack","onEdit","onCalculatePayroll","Alert","Button","Heading","Text","useComponentContext","jsxs","Flex","jsx","DataView","employeeId","HamburgerMenu","PencilSvg"],"mappings":";;;;;;;;AAiBO,MAAMA,IAAmC,CAAC;AAAA,EAC/C,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,oBAAAC;AACF,MAA6C;AAC3C,QAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,EAAA,IAASC,EAAA;AAEzC,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,gBAAe,iBACnB,UAAA;AAAA,MAAA,gBAAAC,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,wCAAoC;AAAA,wBACpDD,GAAA,EAAO,OAAM,qBAAoB,SAASF,GAAoB,UAAA,oBAAA,CAE/D;AAAA,IAAA,GACF;AAAA,IACA,gBAAAQ,EAACJ,KAAK,UAAA,kBAAA,CAAe;AAAA,IACrB,gBAAAE,EAACC,GAAA,EAAK,eAAc,UAAS,YAAW,WACtC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACP;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UAEN,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,wBAEFA,GAAA,EAAM,OAAM,4CAA2C,QAAO,WAC7D,4BAAC,MAAA,EACC,UAAA;AAAA,QAAA,gBAAAO,EAAC,QAAG,UAAA,6CAAA,CAA0C;AAAA,QAC9C,gBAAAA,EAAC,QAAG,UAAA,gDAAA,CAA6C;AAAA,MAAA,EAAA,CACnD,EAAA,CACF;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAA,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,iCAA6B;AAAA,IAC9C,gBAAAK,EAACJ,KAAK,UAAA,uBAAA,CAAoB;AAAA,IAC1B,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAAS;AAAA,UACP;AAAA,YACE,OAAO;AAAA,YACP,QAAQ,MACN,gBAAAH,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,cAAA,gBAAAC,EAACJ,KAAK,UAAA,aAAA,CAAU;AAAA,cAChB,gBAAAI,EAACJ,KAAK,UAAA,YAAA,CAAS;AAAA,YAAA,EAAA,CACjB;AAAA,UAAA;AAAA,UAGJ;AAAA,YACE,OAAO;AAAA,YACP,QAAQ,MAAM,gBAAAI,EAACJ,GAAA,EAAK,UAAA,KAAA,CAAE;AAAA,UAAA;AAAA,QACxB;AAAA,QAEF,MAAMP;AAAA,QACN,UAAU,CAAC,EAAE,YAAAa,EAAA,MACX,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,cACL;AAAA,gBACE,OAAO;AAAA,gBACP,MAAM,gBAAAH,EAACI,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,gBAC7B,SAAS,MAAM;AACb,kBAAAb,EAAO,EAAE,YAAAW,GAAY;AAAA,gBACvB;AAAA,cAAA;AAAA,YACF;AAAA,YAEF,cAAa;AAAA,YACb,WAAW;AAAA,UAAA;AAAA,QAAA;AAAA,MACb;AAAA,IAAA;AAAA,sBAGHR,GAAA,EAAO,OAAM,QAAO,SAASJ,GAAQ,UAAA,OAAA,CAEtC;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useForm as m, FormProvider as s } from "react-hook-form";
|
|
3
3
|
import { Flex as a } from "../../Common/Flex/Flex.js";
|
|
4
|
-
import
|
|
4
|
+
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
6
|
+
import { NumberInputField as d } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
7
|
+
import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
8
|
import { Form as u } from "../../Common/Form/Form.js";
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const { Button: n, Heading: e, Text: t } = d(), i = m();
|
|
9
|
+
const C = ({ onDone: e }) => {
|
|
10
|
+
const { Button: n, Heading: o, Text: t } = p(), i = m();
|
|
9
11
|
return /* @__PURE__ */ l(a, { flexDirection: "column", gap: 20, children: [
|
|
10
|
-
/* @__PURE__ */ r(
|
|
11
|
-
/* @__PURE__ */ r(
|
|
12
|
+
/* @__PURE__ */ r(o, { as: "h2", children: "Edit Hannah Arendt's payroll" }),
|
|
13
|
+
/* @__PURE__ */ r(o, { as: "h1", children: "$1,173.08" }),
|
|
12
14
|
/* @__PURE__ */ r(t, { children: "Gross pay" }),
|
|
13
|
-
/* @__PURE__ */ r(
|
|
14
|
-
/* @__PURE__ */ r(s, { ...i, children: /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
|
|
15
|
-
/* @__PURE__ */ r(n, { onClick:
|
|
15
|
+
/* @__PURE__ */ r(o, { as: "h3", children: "Regular hours" }),
|
|
16
|
+
/* @__PURE__ */ r(s, { ...i, children: /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(d, { defaultValue: 40, isRequired: !0, label: "Hours", name: "hours" }) }) }),
|
|
17
|
+
/* @__PURE__ */ r(n, { onClick: e, title: "Done", children: "Done" })
|
|
16
18
|
] });
|
|
17
19
|
};
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
C as PayrollEditEmployeePresentation
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=PayrollEditEmployeePresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollEditEmployeePresentation.js","sources":["../../../../src/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { Flex, NumberInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Form } from '@/components/Common/Form'\n\ninterface PayrollEditEmployeeProps {\n onDone: () => void\n}\n\nexport const PayrollEditEmployeePresentation = ({ onDone }: PayrollEditEmployeeProps) => {\n const { Button, Heading, Text } = useComponentContext()\n const formHandlers = useForm()\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Heading as=\"h2\">{`Edit Hannah Arendt's payroll`}</Heading>\n <Heading as=\"h1\">$1,173.08</Heading>\n <Text>Gross pay</Text>\n <Heading as=\"h3\">Regular hours</Heading>\n <FormProvider {...formHandlers}>\n <Form>\n <NumberInputField defaultValue={40} isRequired label=\"Hours\" name=\"hours\" />\n </Form>\n </FormProvider>\n\n <Button onClick={onDone} title=\"Done\">\n Done\n </Button>\n </Flex>\n )\n}\n"],"names":["PayrollEditEmployeePresentation","onDone","Button","Heading","Text","useComponentContext","formHandlers","useForm","jsxs","Flex","jsx","FormProvider","Form","NumberInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PayrollEditEmployeePresentation.js","sources":["../../../../src/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { Flex, NumberInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Form } from '@/components/Common/Form'\n\ninterface PayrollEditEmployeeProps {\n onDone: () => void\n}\n\nexport const PayrollEditEmployeePresentation = ({ onDone }: PayrollEditEmployeeProps) => {\n const { Button, Heading, Text } = useComponentContext()\n const formHandlers = useForm()\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Heading as=\"h2\">{`Edit Hannah Arendt's payroll`}</Heading>\n <Heading as=\"h1\">$1,173.08</Heading>\n <Text>Gross pay</Text>\n <Heading as=\"h3\">Regular hours</Heading>\n <FormProvider {...formHandlers}>\n <Form>\n <NumberInputField defaultValue={40} isRequired label=\"Hours\" name=\"hours\" />\n </Form>\n </FormProvider>\n\n <Button onClick={onDone} title=\"Done\">\n Done\n </Button>\n </Flex>\n )\n}\n"],"names":["PayrollEditEmployeePresentation","onDone","Button","Heading","Text","useComponentContext","formHandlers","useForm","jsxs","Flex","jsx","FormProvider","Form","NumberInputField"],"mappings":";;;;;;;;AASO,MAAMA,IAAkC,CAAC,EAAE,QAAAC,QAAuC;AACvF,QAAM,EAAE,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,EAAA,IAASC,EAAA,GAC5BC,IAAeC,EAAA;AACrB,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC,EAACP,GAAA,EAAQ,IAAG,MAAM,UAAA,gCAA+B;AAAA,IACjD,gBAAAO,EAACP,GAAA,EAAQ,IAAG,MAAK,UAAA,aAAS;AAAA,IAC1B,gBAAAO,EAACN,KAAK,UAAA,YAAA,CAAS;AAAA,IACf,gBAAAM,EAACP,GAAA,EAAQ,IAAG,MAAK,UAAA,iBAAa;AAAA,sBAC7BQ,GAAA,EAAc,GAAGL,GAChB,UAAA,gBAAAI,EAACE,KACC,UAAA,gBAAAF,EAACG,GAAA,EAAiB,cAAc,IAAI,YAAU,IAAC,OAAM,SAAQ,MAAK,QAAA,CAAQ,GAC5E,GACF;AAAA,sBAECX,GAAA,EAAO,SAASD,GAAQ,OAAM,QAAO,UAAA,OAAA,CAEtC;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { Flex as d } from "../../Common/Flex/Flex.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
3
|
+
import "classnames";
|
|
4
|
+
import "../../../shared/constants.js";
|
|
5
|
+
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
import { DataView as u } from "../../Common/DataView/DataView.js";
|
|
7
|
+
const f = ({
|
|
6
8
|
onRunPayroll: t,
|
|
7
9
|
payrolls: l
|
|
8
10
|
}) => {
|
|
9
|
-
const { Badge:
|
|
11
|
+
const { Badge: o, Button: n, Text: r } = m();
|
|
10
12
|
return /* @__PURE__ */ e(
|
|
11
|
-
|
|
13
|
+
u,
|
|
12
14
|
{
|
|
13
15
|
columns: [
|
|
14
16
|
{
|
|
@@ -24,13 +26,13 @@ const x = ({
|
|
|
24
26
|
},
|
|
25
27
|
{
|
|
26
28
|
title: "Status",
|
|
27
|
-
render: () => /* @__PURE__ */ e(
|
|
29
|
+
render: () => /* @__PURE__ */ e(o, { children: "Ready to submit" })
|
|
28
30
|
}
|
|
29
31
|
],
|
|
30
32
|
data: l,
|
|
31
33
|
label: "Payrolls",
|
|
32
34
|
itemMenu: ({ payrollId: i }) => /* @__PURE__ */ e(
|
|
33
|
-
|
|
35
|
+
n,
|
|
34
36
|
{
|
|
35
37
|
onClick: () => {
|
|
36
38
|
t({ payrollId: i });
|
|
@@ -44,6 +46,6 @@ const x = ({
|
|
|
44
46
|
);
|
|
45
47
|
};
|
|
46
48
|
export {
|
|
47
|
-
|
|
49
|
+
f as PayrollListPresentation
|
|
48
50
|
};
|
|
49
51
|
//# sourceMappingURL=PayrollListPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollListPresentation.js","sources":["../../../../src/components/Payroll/PayrollList/PayrollListPresentation.tsx"],"sourcesContent":["import { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n//TODO: Use Speakeasy type\ninterface PayrollItem {\n payrollId: string\n}\ninterface PayrollListPresentationProps {\n onRunPayroll: ({ payrollId }: PayrollItem) => void\n payrolls: PayrollItem[]\n}\nexport const PayrollListPresentation = ({\n onRunPayroll,\n payrolls,\n}: PayrollListPresentationProps) => {\n const { Badge, Button, Text } = useComponentContext()\n return (\n <DataView\n columns={[\n {\n render: () => (\n <Flex flexDirection=\"column\">\n <Text>Jul 5 - Jul 18, 2025</Text>\n <Text>Regular Payroll</Text>\n </Flex>\n ),\n title: 'Pay period',\n },\n {\n title: 'Run by',\n render: () => <Text>Wed Jul 23, 2025</Text>,\n },\n {\n title: 'Status',\n render: () => <Badge>Ready to submit</Badge>,\n },\n ]}\n data={payrolls}\n label=\"Payrolls\"\n itemMenu={({ payrollId }) => (\n <Button\n onClick={() => {\n onRunPayroll({ payrollId })\n }}\n title=\"Run payroll\"\n variant=\"secondary\"\n >\n Run payroll\n </Button>\n )}\n />\n )\n}\n"],"names":["PayrollListPresentation","onRunPayroll","payrolls","Badge","Button","Text","useComponentContext","jsx","DataView","jsxs","Flex","payrollId"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PayrollListPresentation.js","sources":["../../../../src/components/Payroll/PayrollList/PayrollListPresentation.tsx"],"sourcesContent":["import { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n//TODO: Use Speakeasy type\ninterface PayrollItem {\n payrollId: string\n}\ninterface PayrollListPresentationProps {\n onRunPayroll: ({ payrollId }: PayrollItem) => void\n payrolls: PayrollItem[]\n}\nexport const PayrollListPresentation = ({\n onRunPayroll,\n payrolls,\n}: PayrollListPresentationProps) => {\n const { Badge, Button, Text } = useComponentContext()\n return (\n <DataView\n columns={[\n {\n render: () => (\n <Flex flexDirection=\"column\">\n <Text>Jul 5 - Jul 18, 2025</Text>\n <Text>Regular Payroll</Text>\n </Flex>\n ),\n title: 'Pay period',\n },\n {\n title: 'Run by',\n render: () => <Text>Wed Jul 23, 2025</Text>,\n },\n {\n title: 'Status',\n render: () => <Badge>Ready to submit</Badge>,\n },\n ]}\n data={payrolls}\n label=\"Payrolls\"\n itemMenu={({ payrollId }) => (\n <Button\n onClick={() => {\n onRunPayroll({ payrollId })\n }}\n title=\"Run payroll\"\n variant=\"secondary\"\n >\n Run payroll\n </Button>\n )}\n />\n )\n}\n"],"names":["PayrollListPresentation","onRunPayroll","payrolls","Badge","Button","Text","useComponentContext","jsx","DataView","jsxs","Flex","payrollId"],"mappings":";;;;;;AAWO,MAAMA,IAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,UAAAC;AACF,MAAoC;AAClC,QAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,EAAA,IAASC,EAAA;AAChC,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAS;AAAA,QACP;AAAA,UACE,QAAQ,MACN,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,YAAA,gBAAAH,EAACF,KAAK,UAAA,uBAAA,CAAoB;AAAA,YAC1B,gBAAAE,EAACF,KAAK,UAAA,kBAAA,CAAe;AAAA,UAAA,GACvB;AAAA,UAEF,OAAO;AAAA,QAAA;AAAA,QAET;AAAA,UACE,OAAO;AAAA,UACP,QAAQ,MAAM,gBAAAE,EAACF,GAAA,EAAK,UAAA,mBAAA,CAAgB;AAAA,QAAA;AAAA,QAEtC;AAAA,UACE,OAAO;AAAA,UACP,QAAQ,MAAM,gBAAAE,EAACJ,GAAA,EAAM,UAAA,kBAAA,CAAe;AAAA,QAAA;AAAA,MACtC;AAAA,MAEF,MAAMD;AAAA,MACN,OAAM;AAAA,MACN,UAAU,CAAC,EAAE,WAAAS,EAAA,MACX,gBAAAJ;AAAA,QAACH;AAAA,QAAA;AAAA,UACC,SAAS,MAAM;AACb,YAAAH,EAAa,EAAE,WAAAU,GAAW;AAAA,UAC5B;AAAA,UACA,OAAM;AAAA,UACN,SAAQ;AAAA,UACT,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAED;AAAA,EAAA;AAIR;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { usePayrollsSubmitMutation as u } from "
|
|
2
|
+
import { usePayrollsSubmitMutation as u } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/payrollsSubmit.js";
|
|
3
3
|
import { PayrollOverviewPresentation as a } from "./PayrollOverviewPresentation.js";
|
|
4
4
|
import { componentEvents as r } from "../../../shared/constants.js";
|
|
5
5
|
import { BaseComponent as c } from "../../Base/Base.js";
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Flex as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as l } from "../../Common/Flex/Flex.js";
|
|
3
|
+
import "classnames";
|
|
4
|
+
import "../../../shared/constants.js";
|
|
5
|
+
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
6
|
import { DataView as s } from "../../Common/DataView/DataView.js";
|
|
5
|
-
const
|
|
6
|
-
const { Alert: i, Button: n, Heading: o, Text: t } =
|
|
7
|
-
return /* @__PURE__ */ l
|
|
8
|
-
/* @__PURE__ */ l
|
|
7
|
+
const f = ({ onEdit: a, onSubmit: d }) => {
|
|
8
|
+
const { Alert: i, Button: n, Heading: o, Text: t } = m();
|
|
9
|
+
return /* @__PURE__ */ r(l, { flexDirection: "column", alignItems: "stretch", children: [
|
|
10
|
+
/* @__PURE__ */ r(l, { justifyContent: "space-between", children: [
|
|
9
11
|
/* @__PURE__ */ e(o, { as: "h1", children: "Review payroll for Jul 5 - Jul 18, 2025" }),
|
|
10
|
-
/* @__PURE__ */ l
|
|
12
|
+
/* @__PURE__ */ r(l, { justifyContent: "flex-end", children: [
|
|
11
13
|
/* @__PURE__ */ e(n, { title: "Edit", onClick: a, variant: "secondary", children: "Edit" }),
|
|
12
14
|
/* @__PURE__ */ e(n, { title: "Submit", onClick: d, children: "Submit" })
|
|
13
15
|
] })
|
|
@@ -63,6 +65,6 @@ const p = ({ onEdit: a, onSubmit: d }) => {
|
|
|
63
65
|
] });
|
|
64
66
|
};
|
|
65
67
|
export {
|
|
66
|
-
|
|
68
|
+
f as PayrollOverviewPresentation
|
|
67
69
|
};
|
|
68
70
|
//# sourceMappingURL=PayrollOverviewPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollOverviewPresentation.js","sources":["../../../../src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx"],"sourcesContent":["import { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface PayrollOverviewProps {\n onEdit: () => void\n onSubmit: () => void\n}\n\nexport const PayrollOverviewPresentation = ({ onEdit, onSubmit }: PayrollOverviewProps) => {\n const { Alert, Button, Heading, Text } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" alignItems=\"stretch\">\n <Flex justifyContent=\"space-between\">\n <Heading as=\"h1\">Review payroll for Jul 5 - Jul 18, 2025</Heading>\n <Flex justifyContent=\"flex-end\">\n <Button title=\"Edit\" onClick={onEdit} variant=\"secondary\">\n Edit\n </Button>\n <Button title=\"Submit\" onClick={onSubmit}>\n Submit\n </Button>\n </Flex>\n </Flex>\n <Alert label=\"Your progress has been saved\" status=\"success\"></Alert>\n <Alert\n label=\"To pay your employees with direct deposit on Fri, Jul 25, you'll need to run payroll by 7:00 PM EDT on Wed, Jul 23\"\n status=\"warning\"\n >\n {\"If you miss this deadline, your employees' direct deposit will be delayed.\"}\n </Alert>\n <Heading as=\"h3\">Payroll Summary</Heading>\n <DataView\n label=\"Summary\"\n columns={[\n {\n title: 'Total payroll',\n render: () => <Text>$32,161.22</Text>,\n },\n {\n title: 'Debit amount',\n render: () => <Text>$28,896.27</Text>,\n },\n ]}\n data={[{}]}\n />\n <DataView\n label=\"Configuration\"\n columns={[\n {\n title: 'Employees',\n render: () => <Text>John Smith</Text>,\n },\n {\n title: 'Gross Pay',\n render: () => <Text>$2,345.16</Text>,\n },\n {\n title: 'Reimbursements',\n render: () => <Text>$0.00</Text>,\n },\n ]}\n data={[{}]}\n />\n </Flex>\n )\n}\n"],"names":["PayrollOverviewPresentation","onEdit","onSubmit","Alert","Button","Heading","Text","useComponentContext","jsxs","Flex","jsx","DataView"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PayrollOverviewPresentation.js","sources":["../../../../src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx"],"sourcesContent":["import { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface PayrollOverviewProps {\n onEdit: () => void\n onSubmit: () => void\n}\n\nexport const PayrollOverviewPresentation = ({ onEdit, onSubmit }: PayrollOverviewProps) => {\n const { Alert, Button, Heading, Text } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" alignItems=\"stretch\">\n <Flex justifyContent=\"space-between\">\n <Heading as=\"h1\">Review payroll for Jul 5 - Jul 18, 2025</Heading>\n <Flex justifyContent=\"flex-end\">\n <Button title=\"Edit\" onClick={onEdit} variant=\"secondary\">\n Edit\n </Button>\n <Button title=\"Submit\" onClick={onSubmit}>\n Submit\n </Button>\n </Flex>\n </Flex>\n <Alert label=\"Your progress has been saved\" status=\"success\"></Alert>\n <Alert\n label=\"To pay your employees with direct deposit on Fri, Jul 25, you'll need to run payroll by 7:00 PM EDT on Wed, Jul 23\"\n status=\"warning\"\n >\n {\"If you miss this deadline, your employees' direct deposit will be delayed.\"}\n </Alert>\n <Heading as=\"h3\">Payroll Summary</Heading>\n <DataView\n label=\"Summary\"\n columns={[\n {\n title: 'Total payroll',\n render: () => <Text>$32,161.22</Text>,\n },\n {\n title: 'Debit amount',\n render: () => <Text>$28,896.27</Text>,\n },\n ]}\n data={[{}]}\n />\n <DataView\n label=\"Configuration\"\n columns={[\n {\n title: 'Employees',\n render: () => <Text>John Smith</Text>,\n },\n {\n title: 'Gross Pay',\n render: () => <Text>$2,345.16</Text>,\n },\n {\n title: 'Reimbursements',\n render: () => <Text>$0.00</Text>,\n },\n ]}\n data={[{}]}\n />\n </Flex>\n )\n}\n"],"names":["PayrollOverviewPresentation","onEdit","onSubmit","Alert","Button","Heading","Text","useComponentContext","jsxs","Flex","jsx","DataView"],"mappings":";;;;;;AAQO,MAAMA,IAA8B,CAAC,EAAE,QAAAC,GAAQ,UAAAC,QAAqC;AACzF,QAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,EAAA,IAASC,EAAA;AAEzC,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,YAAW,WACtC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,gBAAe,iBACnB,UAAA;AAAA,MAAA,gBAAAC,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,2CAAuC;AAAA,MACxD,gBAAAG,EAACC,GAAA,EAAK,gBAAe,YACnB,UAAA;AAAA,QAAA,gBAAAC,EAACN,KAAO,OAAM,QAAO,SAASH,GAAQ,SAAQ,aAAY,UAAA,OAAA,CAE1D;AAAA,0BACCG,GAAA,EAAO,OAAM,UAAS,SAASF,GAAU,UAAA,SAAA,CAE1C;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAQ,EAACP,GAAA,EAAM,OAAM,gCAA+B,QAAO,WAAU;AAAA,IAC7D,gBAAAO;AAAA,MAACP;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,QAAO;AAAA,QAEN,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH,gBAAAO,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,mBAAe;AAAA,IAChC,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAAS;AAAA,UACP;AAAA,YACE,OAAO;AAAA,YACP,QAAQ,MAAM,gBAAAD,EAACJ,GAAA,EAAK,UAAA,aAAA,CAAU;AAAA,UAAA;AAAA,UAEhC;AAAA,YACE,OAAO;AAAA,YACP,QAAQ,MAAM,gBAAAI,EAACJ,GAAA,EAAK,UAAA,aAAA,CAAU;AAAA,UAAA;AAAA,QAChC;AAAA,QAEF,MAAM,CAAC,CAAA,CAAE;AAAA,MAAA;AAAA,IAAA;AAAA,IAEX,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAAS;AAAA,UACP;AAAA,YACE,OAAO;AAAA,YACP,QAAQ,MAAM,gBAAAD,EAACJ,GAAA,EAAK,UAAA,aAAA,CAAU;AAAA,UAAA;AAAA,UAEhC;AAAA,YACE,OAAO;AAAA,YACP,QAAQ,MAAM,gBAAAI,EAACJ,GAAA,EAAK,UAAA,YAAA,CAAS;AAAA,UAAA;AAAA,UAE/B;AAAA,YACE,OAAO;AAAA,YACP,QAAQ,MAAM,gBAAAI,EAACJ,GAAA,EAAK,UAAA,QAAA,CAAK;AAAA,UAAA;AAAA,QAC3B;AAAA,QAEF,MAAM,CAAC,CAAA,CAAE;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GACF;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { QueryClient as p, QueryClientProvider as E } from "
|
|
3
|
-
import { GustoEmbeddedProvider as H } from "
|
|
4
|
-
import { GustoEmbeddedCore as b } from "
|
|
5
|
-
import { SDKHooks as R } from "
|
|
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";
|
|
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(() => {
|
|
@@ -6,10 +6,12 @@ import { ComponentsProvider as P } from "../ComponentAdapter/ComponentsProvider.
|
|
|
6
6
|
import { ApiProvider as I } from "../ApiProvider/ApiProvider.js";
|
|
7
7
|
import { LoadingIndicatorProvider as x } from "../LoadingIndicatorProvider/LoadingIndicatorProvider.js";
|
|
8
8
|
import { SDKI18next as t } from "./SDKI18next.js";
|
|
9
|
+
import "classnames";
|
|
10
|
+
import "../../shared/constants.js";
|
|
9
11
|
import { InternalError as y } from "../../components/Common/InternalError/InternalError.js";
|
|
10
12
|
import { LocaleProvider as C } from "../LocaleProvider/LocaleProvider.js";
|
|
11
13
|
import { ThemeProvider as L } from "../ThemeProvider/ThemeProvider.js";
|
|
12
|
-
const
|
|
14
|
+
const R = (a) => {
|
|
13
15
|
const {
|
|
14
16
|
children: d,
|
|
15
17
|
config: e,
|
|
@@ -17,8 +19,8 @@ const G = (a) => {
|
|
|
17
19
|
lng: n = "en",
|
|
18
20
|
locale: c = "en-US",
|
|
19
21
|
currency: l = "USD",
|
|
20
|
-
theme:
|
|
21
|
-
components:
|
|
22
|
+
theme: p,
|
|
23
|
+
components: s,
|
|
22
24
|
LoaderComponent: f
|
|
23
25
|
} = a;
|
|
24
26
|
if (o)
|
|
@@ -35,9 +37,9 @@ const G = (a) => {
|
|
|
35
37
|
}
|
|
36
38
|
return g(() => {
|
|
37
39
|
(async () => await t.changeLanguage(n))();
|
|
38
|
-
}, [n]), /* @__PURE__ */ r(P, { value:
|
|
40
|
+
}, [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
41
|
};
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
R as GustoProviderCustomUIAdapter
|
|
42
44
|
};
|
|
43
45
|
//# 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":"
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as c, useEffect as
|
|
3
|
-
import { useTranslation as
|
|
2
|
+
import { useRef as c, useEffect as a } from "react";
|
|
3
|
+
import { useTranslation as i } from "react-i18next";
|
|
4
4
|
import { ThemeContext as d } from "./useTheme.js";
|
|
5
5
|
import { mergePartnerTheme as l } from "./theme.js";
|
|
6
6
|
/* empty css */
|
|
@@ -8,13 +8,13 @@ const D = ({
|
|
|
8
8
|
theme: n = {},
|
|
9
9
|
children: t
|
|
10
10
|
}) => {
|
|
11
|
-
const e = c(null), { t: r } =
|
|
12
|
-
return
|
|
13
|
-
const
|
|
11
|
+
const e = c(null), { t: r } = i(), o = c(null);
|
|
12
|
+
return a(() => {
|
|
13
|
+
const u = l(n);
|
|
14
14
|
e.current && e.current.remove(), e.current = document.createElement("style"), e.current.setAttribute("data-testid", "GSDK"), e.current.appendChild(
|
|
15
15
|
document.createTextNode(
|
|
16
16
|
`.GSDK{
|
|
17
|
-
${m(
|
|
17
|
+
${m(u).join(`
|
|
18
18
|
`)}
|
|
19
19
|
}`
|
|
20
20
|
)
|
|
@@ -24,7 +24,7 @@ ${m(i).join(`
|
|
|
24
24
|
}, m = (n, t) => {
|
|
25
25
|
const e = [];
|
|
26
26
|
for (const [r, o] of Object.entries(n))
|
|
27
|
-
typeof o == "object" ? e.push(...m(o, t ? t + "-" + r : r)) : e.push(`--g-${t ? t + "-" + r : r}: ${
|
|
27
|
+
typeof o == "object" ? e.push(...m(o, t ? t + "-" + r : r)) : e.push(`--g-${t ? t + "-" + r : r}: ${o};`);
|
|
28
28
|
return e;
|
|
29
29
|
};
|
|
30
30
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sources":["../../../src/contexts/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { ThemeContext } from './useTheme'\nimport { mergePartnerTheme, type GustoSDKTheme } from './theme'\nimport '@/styles/sdk.scss'\n\nexport interface ThemeProviderProps {\n theme?: GustoSDKTheme\n children?: React.ReactNode\n}\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n theme: partnerThemeOverrides = {},\n children,\n}) => {\n const GThemeVariables = useRef<HTMLStyleElement | null>(null)\n const { t } = useTranslation()\n const containerRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n const gustoSDKThemeWithOverrides = mergePartnerTheme(partnerThemeOverrides)\n\n if (GThemeVariables.current) {\n GThemeVariables.current.remove()\n }\n GThemeVariables.current = document.createElement('style')\n GThemeVariables.current.setAttribute('data-testid', 'GSDK')\n GThemeVariables.current.appendChild(\n document.createTextNode(\n `.GSDK{\\n${parseThemeToCSS(gustoSDKThemeWithOverrides).join('\\n')}\\n}`,\n ),\n )\n document.head.appendChild(GThemeVariables.current)\n }, [partnerThemeOverrides, t])\n\n return (\n // @ts-expect-error HACK fix mismatch where containerRef allows null\n <ThemeContext.Provider value={{ container: containerRef }}>\n <article className=\"GSDK\" data-testid=\"GSDK\" ref={containerRef}>\n {children}\n </article>\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Recursive flattening of the theme object into css variable format\n */\nconst parseThemeToCSS = (theme: GustoSDKTheme, prefix?: string): string[] => {\n const cssProps: string[] = []\n for (const [key, value] of Object.entries(theme)) {\n if (typeof value === 'object') {\n cssProps.push(...parseThemeToCSS(value, prefix ? prefix + '-' + key : key))\n } else {\n cssProps.push(`--g-${prefix ? prefix + '-' + key : key}: ${
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../../src/contexts/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { ThemeContext } from './useTheme'\nimport { mergePartnerTheme, type GustoSDKTheme } from './theme'\nimport '@/styles/sdk.scss'\n\nexport interface ThemeProviderProps {\n theme?: GustoSDKTheme\n children?: React.ReactNode\n}\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n theme: partnerThemeOverrides = {},\n children,\n}) => {\n const GThemeVariables = useRef<HTMLStyleElement | null>(null)\n const { t } = useTranslation()\n const containerRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n const gustoSDKThemeWithOverrides = mergePartnerTheme(partnerThemeOverrides)\n\n if (GThemeVariables.current) {\n GThemeVariables.current.remove()\n }\n GThemeVariables.current = document.createElement('style')\n GThemeVariables.current.setAttribute('data-testid', 'GSDK')\n GThemeVariables.current.appendChild(\n document.createTextNode(\n `.GSDK{\\n${parseThemeToCSS(gustoSDKThemeWithOverrides).join('\\n')}\\n}`,\n ),\n )\n document.head.appendChild(GThemeVariables.current)\n }, [partnerThemeOverrides, t])\n\n return (\n // @ts-expect-error HACK fix mismatch where containerRef allows null\n <ThemeContext.Provider value={{ container: containerRef }}>\n <article className=\"GSDK\" data-testid=\"GSDK\" ref={containerRef}>\n {children}\n </article>\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Recursive flattening of the theme object into css variable format\n */\nconst parseThemeToCSS = (theme: GustoSDKTheme, prefix?: string): string[] => {\n const cssProps: string[] = []\n for (const [key, value] of Object.entries(theme)) {\n if (typeof value === 'object') {\n cssProps.push(...parseThemeToCSS(value, prefix ? prefix + '-' + key : key))\n } else {\n cssProps.push(`--g-${prefix ? prefix + '-' + key : key}: ${value};`)\n }\n }\n return cssProps\n}\n"],"names":["ThemeProvider","partnerThemeOverrides","children","GThemeVariables","useRef","t","useTranslation","containerRef","useEffect","gustoSDKThemeWithOverrides","mergePartnerTheme","parseThemeToCSS","ThemeContext","jsx","theme","prefix","cssProps","key","value"],"mappings":";;;;;;AAYO,MAAMA,IAA8C,CAAC;AAAA,EAC1D,OAAOC,IAAwB,CAAA;AAAA,EAC/B,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAkBC,EAAgC,IAAI,GACtD,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAeH,EAAoB,IAAI;AAE7C,SAAAI,EAAU,MAAM;AACd,UAAMC,IAA6BC,EAAkBT,CAAqB;AAE1E,IAAIE,EAAgB,WAClBA,EAAgB,QAAQ,OAAA,GAE1BA,EAAgB,UAAU,SAAS,cAAc,OAAO,GACxDA,EAAgB,QAAQ,aAAa,eAAe,MAAM,GAC1DA,EAAgB,QAAQ;AAAA,MACtB,SAAS;AAAA,QACP;AAAA,EAAWQ,EAAgBF,CAA0B,EAAE,KAAK;AAAA,CAAI,CAAC;AAAA;AAAA,MAAA;AAAA,IACnE,GAEF,SAAS,KAAK,YAAYN,EAAgB,OAAO;AAAA,EACnD,GAAG,CAACF,GAAuBI,CAAC,CAAC;AAAA,oBAI1BO,EAAa,UAAb,EAAsB,OAAO,EAAE,WAAWL,EAAA,GACzC,UAAA,gBAAAM,EAAC,WAAA,EAAQ,WAAU,QAAO,eAAY,QAAO,KAAKN,GAC/C,UAAAL,GACH,EAAA,CACF;AAEJ,GAKMS,IAAkB,CAACG,GAAsBC,MAA8B;AAC3E,QAAMC,IAAqB,CAAA;AAC3B,aAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQJ,CAAK;AAC7C,IAAI,OAAOI,KAAU,WACnBF,EAAS,KAAK,GAAGL,EAAgBO,GAAOH,IAASA,IAAS,MAAME,IAAMA,CAAG,CAAC,IAE1ED,EAAS,KAAK,OAAOD,IAASA,IAAS,MAAME,IAAMA,CAAG,KAAKC,CAAK,GAAG;AAGvE,SAAOF;AACT;"}
|
package/dist/i18n/I18n.js
CHANGED
|
@@ -5,7 +5,7 @@ const C = "common", s = new l(50), c = ({ lng: n = "en", ns: o }) => {
|
|
|
5
5
|
let e = !0, t = !1, r;
|
|
6
6
|
const i = (async () => {
|
|
7
7
|
try {
|
|
8
|
-
r = (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.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.PayrollHistoryList.json": () => import("./en/Payroll.PayrollHistoryList.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
|
+
r = (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.PayrollHistoryList.json": () => import("./en/Payroll.PayrollHistoryList.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
|
t = !0, e = !1;
|
|
11
11
|
}
|
package/dist/i18n/I18n.js.map
CHANGED
|
@@ -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,
|
|
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,2gGAAA,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;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const e = "Step 4b: Deductions", t = "Step 3: Dependents (if applicable)", o = "Step 4c: Extra withholding", i = "Step 1c: Federal filing status (1c)", l = "Select filing status...", s = "Federal tax withholdings (Form W-4)", a = `We'll use this information to withhold the appropriate federal taxes from each paycheck. If you’re unsure what to enter here, refer to <irs_calculator href="https://www.irs.gov/pub/irs-pdf/fw4.pdf" target="_blank">Form W4</irs_calculator> to calculate the values, visit our <help_center href="https://support.gusto.com" target="_blank">Help Center</help_center>, or consult your tax advisor.`, n = "Exempt from withholding", r = "Head of household", c = "Married", h = "Single", d = "This field is a required field. Please enter a value.", u = 'Includes spouse, if applicable. Answering 2c will result in a higher withholding, but to preserve privacy, this can be left unchecked. <irs_link href="https://www.irs.gov/newsroom/faqs-on-the-2020-form-w-4" target="_blank">Learn more on the IRS website</irs_link>.', p = "Step 2c: Multiple jobs (2c)", f = "Step 4a: Other income", w = "If you select Exempt from withholding, we wont withhold federal income taxes, but well still report taxable wages on a W-2. Keep in mind that anyone who claims exemption from withholding needs to submit a new W-4 each year.", g = "Continue", m = "Yes", S = "No", b = { federalFilingStatus: "Please select filing status", federalTwoJobs: "Please select an option" }, x = {
|
|
2
|
+
deductions: e,
|
|
3
|
+
dependentsTotalIfApplicable: t,
|
|
4
|
+
extraWithholding: o,
|
|
5
|
+
federalFilingStatus1c: i,
|
|
6
|
+
federalFillingStatusPlaceholder: l,
|
|
7
|
+
federalTaxesTitle: s,
|
|
8
|
+
irs_calculator: a,
|
|
9
|
+
filingStatusExemptFromWithholding: n,
|
|
10
|
+
filingStatusHeadOfHousehold: r,
|
|
11
|
+
filingStatusMarried: c,
|
|
12
|
+
filingStatusSingle: h,
|
|
13
|
+
fieldIsRequired: d,
|
|
14
|
+
includesSpouseExplanation: u,
|
|
15
|
+
multipleJobs2c: p,
|
|
16
|
+
otherIncome: f,
|
|
17
|
+
selectWithholdingDescription: w,
|
|
18
|
+
submitCta: g,
|
|
19
|
+
twoJobYesLabel: "Yes",
|
|
20
|
+
twoJobNoLabel: "No",
|
|
21
|
+
validations: b
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
e as deductions,
|
|
25
|
+
x as default,
|
|
26
|
+
t as dependentsTotalIfApplicable,
|
|
27
|
+
o as extraWithholding,
|
|
28
|
+
i as federalFilingStatus1c,
|
|
29
|
+
l as federalFillingStatusPlaceholder,
|
|
30
|
+
s as federalTaxesTitle,
|
|
31
|
+
d as fieldIsRequired,
|
|
32
|
+
n as filingStatusExemptFromWithholding,
|
|
33
|
+
r as filingStatusHeadOfHousehold,
|
|
34
|
+
c as filingStatusMarried,
|
|
35
|
+
h as filingStatusSingle,
|
|
36
|
+
u as includesSpouseExplanation,
|
|
37
|
+
a as irs_calculator,
|
|
38
|
+
p as multipleJobs2c,
|
|
39
|
+
f as otherIncome,
|
|
40
|
+
w as selectWithholdingDescription,
|
|
41
|
+
g as submitCta,
|
|
42
|
+
S as twoJobNoLabel,
|
|
43
|
+
m as twoJobYesLabel,
|
|
44
|
+
b as validations
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=Employee.FederalTaxes.json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Employee.FederalTaxes.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
const t = "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
cancelCta: e,
|
|
5
|
-
submitCta: s
|
|
1
|
+
const t = "{{state}} Tax Requirements", e = "Continue", s = {
|
|
2
|
+
stateTaxesTitle: t,
|
|
3
|
+
submitCta: e
|
|
6
4
|
};
|
|
7
5
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
s as submitCta,
|
|
12
|
-
t as title
|
|
6
|
+
s as default,
|
|
7
|
+
t as stateTaxesTitle,
|
|
8
|
+
e as submitCta
|
|
13
9
|
};
|
|
14
10
|
//# sourceMappingURL=Employee.StateTaxes.json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Employee.StateTaxes.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Employee.StateTaxes.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const e = "Back", t = "Step 4b: Deductions", o = "Step 3: Dependents (if applicable)",
|
|
1
|
+
const e = "Back", t = "Step 4b: Deductions", o = "Step 3: Dependents (if applicable)", i = "Step 4c: Extra withholding", l = "Step 1c: Federal filing status (1c)", s = "Select filing status...", a = "Federal tax withholdings (Form W-4)", n = "Exempt from withholding", r = "Head of household", c = "Married", h = "Single", u = "This field is a required field. Please enter a value.", d = 'Includes spouse, if applicable. Answering 2c will result in a higher withholding, but to preserve privacy, this can be left unchecked. <irs_link href="https://www.irs.gov/newsroom/faqs-on-the-2020-form-w-4" target="_blank">Learn more on the IRS website</irs_link>.', p = 'We’ll use this information to withhold the appropriate federal taxes from each paycheck. If you’re unsure what to enter here, refer to <irs_calculator href="https://www.irs.gov/pub/irs-pdf/fw4.pdf" target="_blank">Form W4</irs_calculator> to calculate the values, visit our <help_center href="https://support.gusto.com" target="_blank">Help Center</help_center>, or consult your tax advisor.', f = 'Enter the results for {{lineNum}} from the <irs_calculator href="https://www.irs.gov/individuals/tax-withholding-estimator" target="_blank">IRS Calculator</irs_calculator> or <w4_link>form W-4</w4_link>.', w = "Step 2c: Multiple jobs (2c)", g = "Step 4a: Other income", m = "If you select Exempt from withholding, we wont withhold federal income taxes, but well still report taxable wages on a W-2. Keep in mind that anyone who claims exemption from withholding needs to submit a new W-4 each year.", b = "{{state}} Tax Requirements", S = "Continue", _ = "Yes", k = "No", x = { federalFilingStatus: "Please select filing status", federalTwoJobs: "Please select an option" }, v = {
|
|
2
2
|
cancelCta: e,
|
|
3
3
|
deductions: t,
|
|
4
4
|
dependentsTotalIfApplicable: o,
|
|
5
|
-
extraWithholding:
|
|
6
|
-
federalFilingStatus1c:
|
|
7
|
-
federalFillingStatusPlaceholder:
|
|
5
|
+
extraWithholding: i,
|
|
6
|
+
federalFilingStatus1c: l,
|
|
7
|
+
federalFillingStatusPlaceholder: s,
|
|
8
8
|
federalTaxesTitle: a,
|
|
9
9
|
filingStatusExemptFromWithholding: n,
|
|
10
10
|
filingStatusHeadOfHousehold: r,
|
|
@@ -28,9 +28,9 @@ export {
|
|
|
28
28
|
t as deductions,
|
|
29
29
|
v as default,
|
|
30
30
|
o as dependentsTotalIfApplicable,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
i as extraWithholding,
|
|
32
|
+
l as federalFilingStatus1c,
|
|
33
|
+
s as federalFillingStatusPlaceholder,
|
|
34
34
|
a as federalTaxesTitle,
|
|
35
35
|
u as fieldIsRequired,
|
|
36
36
|
n as filingStatusExemptFromWithholding,
|
|
@@ -31,9 +31,10 @@ export declare const employeeEvents: {
|
|
|
31
31
|
readonly EMPLOYEE_BANK_ACCOUNT_CREATE: "employee/bankAccount/create";
|
|
32
32
|
readonly EMPLOYEE_BANK_ACCOUNT_CREATED: "employee/bankAccount/created";
|
|
33
33
|
readonly EMPLOYEE_BANK_ACCOUNT_DELETED: "employee/bankAccount/deleted";
|
|
34
|
-
readonly EMPLOYEE_FEDERAL_TAXES_VIEW: "employee/federalTaxes/view";
|
|
35
34
|
readonly EMPLOYEE_FEDERAL_TAXES_UPDATED: "employee/federalTaxes/updated";
|
|
35
|
+
readonly EMPLOYEE_FEDERAL_TAXES_DONE: "employee/federalTaxes/done";
|
|
36
36
|
readonly EMPLOYEE_STATE_TAXES_UPDATED: "employee/stateTaxes/updated";
|
|
37
|
+
readonly EMPLOYEE_STATE_TAXES_DONE: "employee/stateTaxes/done";
|
|
37
38
|
readonly EMPLOYEE_TAXES_DONE: "employee/taxes/done";
|
|
38
39
|
readonly EMPLOYEE_SPLIT_PAYCHECK: "employee/bankAccount/split";
|
|
39
40
|
readonly EMPLOYEE_JOB_CREATED: "employee/job/created";
|
|
@@ -216,9 +217,10 @@ export declare const componentEvents: {
|
|
|
216
217
|
readonly EMPLOYEE_BANK_ACCOUNT_CREATE: "employee/bankAccount/create";
|
|
217
218
|
readonly EMPLOYEE_BANK_ACCOUNT_CREATED: "employee/bankAccount/created";
|
|
218
219
|
readonly EMPLOYEE_BANK_ACCOUNT_DELETED: "employee/bankAccount/deleted";
|
|
219
|
-
readonly EMPLOYEE_FEDERAL_TAXES_VIEW: "employee/federalTaxes/view";
|
|
220
220
|
readonly EMPLOYEE_FEDERAL_TAXES_UPDATED: "employee/federalTaxes/updated";
|
|
221
|
+
readonly EMPLOYEE_FEDERAL_TAXES_DONE: "employee/federalTaxes/done";
|
|
221
222
|
readonly EMPLOYEE_STATE_TAXES_UPDATED: "employee/stateTaxes/updated";
|
|
223
|
+
readonly EMPLOYEE_STATE_TAXES_DONE: "employee/stateTaxes/done";
|
|
222
224
|
readonly EMPLOYEE_TAXES_DONE: "employee/taxes/done";
|
|
223
225
|
readonly EMPLOYEE_SPLIT_PAYCHECK: "employee/bankAccount/split";
|
|
224
226
|
readonly EMPLOYEE_JOB_CREATED: "employee/job/created";
|