@gusto/embedded-react-sdk 0.12.0 → 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 +4 -4
- 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 +2 -2
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +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/UI/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +19 -9
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +4 -0
- package/dist/components/Common/hooks/useNumberFormatter.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -7
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +9 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -7
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -9
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +7 -7
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +8 -8
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -7
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +4 -4
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- 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 +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -11
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -7
- 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 +9 -10
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -7
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -5
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -16
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +5 -4
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -15
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +3 -2
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -10
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +5 -4
- 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 +7 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +14 -15
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -7
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +3 -2
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -8
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -7
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -4
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -7
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +38 -39
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -10
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
- 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 +3 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
- 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 +3 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +8 -9
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +3 -4
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -9
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +18 -18
- package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -3
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +12 -11
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +42 -22
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +5 -5
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +34 -16
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -5
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +86 -85
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js +23 -16
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +3 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +68 -65
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +16 -16
- package/dist/components/Contractor/Profile/useContractorProfile.js +110 -107
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +38 -38
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +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 +12 -12
- package/dist/components/Employee/Compensation/List.js +23 -22
- 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 +12 -12
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +3 -3
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +9 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +8 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +12 -13
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +3 -2
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +6 -7
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +6 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +12 -12
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -7
- 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 +10 -10
- 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 +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -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/Split.js +9 -9
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +9 -13
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +7 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
- package/dist/components/Employee/Profile/HomeAddress.js +5 -6
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- 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 +3 -7
- 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 +9 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +13 -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 +3 -7
- 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/Flow/Flow.js +15 -13
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +1 -0
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +41 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +11 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +80 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +6 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +19 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +23 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollList/PayrollList.d.ts +6 -0
- package/dist/components/Payroll/PayrollList/PayrollList.js +17 -0
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +51 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +7 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +32 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +6 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +70 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +16 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +55 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +6 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +20 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -0
- package/dist/components/Payroll/index.d.ts +6 -0
- package/dist/components/Payroll/index.js +13 -0
- package/dist/components/Payroll/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +4 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
- 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/Contractor.ContractorList.json.js +13 -11
- package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Profile.json.js +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/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +30 -2
- package/dist/shared/constants.js +75 -47
- package/dist/shared/constants.js.map +1 -1
- package/dist/types/i18next.d.ts +29 -7
- package/package.json +12 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { useEmployeeFormsListSuspense as f } from "
|
|
2
|
+
import { useEmployeeFormsListSuspense as f } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeFormsList.js";
|
|
3
3
|
import { Head as d } from "./Head.js";
|
|
4
4
|
import { List as E } from "./List.js";
|
|
5
5
|
import { Actions as a } from "./Actions.js";
|
|
@@ -9,14 +9,13 @@ import { useBase as L } from "../../../Base/useBase.js";
|
|
|
9
9
|
import { useI18n as S } from "../../../../i18n/I18n.js";
|
|
10
10
|
import { componentEvents as m } from "../../../../shared/constants.js";
|
|
11
11
|
import { Flex as g } from "../../../Common/Flex/Flex.js";
|
|
12
|
-
import "react-i18next";
|
|
13
12
|
import "classnames";
|
|
14
|
-
function
|
|
13
|
+
function B(e) {
|
|
15
14
|
return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(O, { ...e }) });
|
|
16
15
|
}
|
|
17
|
-
function O({ employeeId: e, className: s, children:
|
|
16
|
+
function O({ employeeId: e, className: s, children: n }) {
|
|
18
17
|
S("Employee.DocumentSigner");
|
|
19
|
-
const { onEvent:
|
|
18
|
+
const { onEvent: t } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
|
|
20
19
|
return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
|
|
21
20
|
h,
|
|
22
21
|
{
|
|
@@ -24,14 +23,14 @@ function O({ employeeId: e, className: s, children: t }) {
|
|
|
24
23
|
employeeForms: i,
|
|
25
24
|
hasSignedAllForms: p,
|
|
26
25
|
handleContinue: () => {
|
|
27
|
-
|
|
26
|
+
t(m.EMPLOYEE_FORMS_DONE);
|
|
28
27
|
},
|
|
29
28
|
handleRequestFormToSign: (r) => {
|
|
30
|
-
|
|
29
|
+
t(m.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid });
|
|
31
30
|
},
|
|
32
31
|
documentListError: c
|
|
33
32
|
},
|
|
34
|
-
children:
|
|
33
|
+
children: n || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
|
|
35
34
|
/* @__PURE__ */ o(d, {}),
|
|
36
35
|
/* @__PURE__ */ o(E, {}),
|
|
37
36
|
/* @__PURE__ */ o(a, {})
|
|
@@ -40,6 +39,6 @@ function O({ employeeId: e, className: s, children: t }) {
|
|
|
40
39
|
) });
|
|
41
40
|
}
|
|
42
41
|
export {
|
|
43
|
-
|
|
42
|
+
B as DocumentList
|
|
44
43
|
};
|
|
45
44
|
//# sourceMappingURL=DocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,GAAM,OAAOC,EAAA,IAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAU3F,SACE,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAfwB,CAACP,MAAe;AAC9C,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM;AAAA,QACzE;AAAA,QAcQ,mBAAAC;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
|
|
@@ -3,8 +3,9 @@ import { useTranslation as m } from "react-i18next";
|
|
|
3
3
|
import { useDocumentList as s } from "./useDocumentList.js";
|
|
4
4
|
import { Flex as l } from "../../../Common/Flex/Flex.js";
|
|
5
5
|
import "classnames";
|
|
6
|
+
import "../../../../shared/constants.js";
|
|
6
7
|
import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
|
|
7
|
-
function
|
|
8
|
+
function f() {
|
|
8
9
|
const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
|
|
9
10
|
return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
|
|
10
11
|
u,
|
|
@@ -33,6 +34,6 @@ function b() {
|
|
|
33
34
|
) }) });
|
|
34
35
|
}
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
f as List
|
|
37
38
|
};
|
|
38
39
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAA,GAChE,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC,EAAC,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAAAS,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAAA;AAAA,MAE/B,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MAAA;AAAA,MAEpC,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA,GAErC,EAAA,CACF;AAEJ;"}
|
|
@@ -2,19 +2,15 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-error-boundary";
|
|
4
4
|
import "react-i18next";
|
|
5
|
-
import "@gusto/embedded-api/models/errors/apierror";
|
|
6
|
-
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
-
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
5
|
import "../../../Base/useBase.js";
|
|
10
6
|
import "../../../../shared/constants.js";
|
|
11
7
|
import "classnames";
|
|
12
8
|
import "dompurify";
|
|
13
9
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
10
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
11
|
+
const [x, C] = t("DocumentListContext");
|
|
16
12
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
C as DocumentListProvider,
|
|
14
|
+
x as useDocumentList
|
|
19
15
|
};
|
|
20
16
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as F, Fragment as E } from "react/jsx-runtime";
|
|
2
|
-
import { useEmployeeFormsGetPdfSuspense as h } from "
|
|
3
|
-
import { useEmployeeFormsSignMutation as P } from "
|
|
4
|
-
import { useEmployeeFormsGetSuspense as x } from "
|
|
2
|
+
import { useEmployeeFormsGetPdfSuspense as h } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeFormsGetPdf.js";
|
|
3
|
+
import { useEmployeeFormsSignMutation as P } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeFormsSign.js";
|
|
4
|
+
import { useEmployeeFormsGetSuspense as x } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeFormsGet.js";
|
|
5
5
|
import { Form as b } from "./Form.js";
|
|
6
6
|
import { Head as v } from "./Head.js";
|
|
7
7
|
import { Actions as y } from "./Actions.js";
|
|
@@ -12,17 +12,16 @@ import { useBase as C } from "../../../Base/useBase.js";
|
|
|
12
12
|
import { useI18n as G } from "../../../../i18n/I18n.js";
|
|
13
13
|
import { componentEvents as i } from "../../../../shared/constants.js";
|
|
14
14
|
import { Flex as M } from "../../../Common/Flex/Flex.js";
|
|
15
|
-
import "react-i18next";
|
|
16
15
|
import "classnames";
|
|
17
16
|
import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
|
|
18
|
-
function
|
|
17
|
+
function W(r) {
|
|
19
18
|
return /* @__PURE__ */ o(A, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
|
|
20
19
|
}
|
|
21
|
-
function j({ employeeId: r, formId: s, className: u, children:
|
|
20
|
+
function j({ employeeId: r, formId: s, className: u, children: t }) {
|
|
22
21
|
G("Employee.DocumentSigner");
|
|
23
|
-
const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }),
|
|
22
|
+
const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), n = c.form, {
|
|
24
23
|
data: { formPdf: f }
|
|
25
|
-
} = h({ employeeId: r, formId:
|
|
24
|
+
} = h({ employeeId: r, formId: n.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
|
|
26
25
|
return /* @__PURE__ */ o("section", { className: u, children: /* @__PURE__ */ o(
|
|
27
26
|
w,
|
|
28
27
|
{
|
|
@@ -31,16 +30,16 @@ function j({ employeeId: r, formId: s, className: u, children: n }) {
|
|
|
31
30
|
handleBack: () => {
|
|
32
31
|
e(i.CANCEL);
|
|
33
32
|
},
|
|
34
|
-
form:
|
|
33
|
+
form: n,
|
|
35
34
|
isPending: l
|
|
36
35
|
},
|
|
37
36
|
children: /* @__PURE__ */ o(R, { onSubmit: async (g) => {
|
|
38
37
|
await a(g, async (m) => {
|
|
39
|
-
if (
|
|
38
|
+
if (n.uuid) {
|
|
40
39
|
const { form: S } = await p({
|
|
41
40
|
request: {
|
|
42
41
|
employeeId: r,
|
|
43
|
-
formId:
|
|
42
|
+
formId: n.uuid,
|
|
44
43
|
requestBody: {
|
|
45
44
|
signatureText: m.signature,
|
|
46
45
|
agree: m.confirmSignature
|
|
@@ -50,7 +49,7 @@ function j({ employeeId: r, formId: s, className: u, children: n }) {
|
|
|
50
49
|
e(i.EMPLOYEE_SIGN_FORM, S);
|
|
51
50
|
}
|
|
52
51
|
});
|
|
53
|
-
}, children: /* @__PURE__ */ o(M, { flexDirection: "column", children:
|
|
52
|
+
}, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: t || /* @__PURE__ */ F(E, { children: [
|
|
54
53
|
/* @__PURE__ */ o(v, {}),
|
|
55
54
|
/* @__PURE__ */ o(B, {}),
|
|
56
55
|
/* @__PURE__ */ o(b, {}),
|
|
@@ -60,6 +59,6 @@ function j({ employeeId: r, formId: s, className: u, children: n }) {
|
|
|
60
59
|
) });
|
|
61
60
|
}
|
|
62
61
|
export {
|
|
63
|
-
|
|
62
|
+
W as SignatureForm
|
|
64
63
|
};
|
|
65
64
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAChF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAAA;AAwBhE,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAlB,EAACsB,GAAA,EAAoB,UA5BN,OAAOX,MAA8B;AACxD,cAAMF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAA,IAAmB,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACD,YAAAf,EAAQa,EAAgB,oBAAoBG,CAAc;AAAA,UAC5D;AAAA,QACF,CAAC;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UAAAnB,KAGC,gBAAAoB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAc;AAAA,0BACdC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -2,19 +2,15 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-error-boundary";
|
|
4
4
|
import "react-i18next";
|
|
5
|
-
import "@gusto/embedded-api/models/errors/apierror";
|
|
6
|
-
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
-
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
5
|
import "../../../Base/useBase.js";
|
|
10
6
|
import "../../../../shared/constants.js";
|
|
11
7
|
import "classnames";
|
|
12
8
|
import "dompurify";
|
|
13
9
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
10
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
11
|
+
const [x, C] = o("SignatureFormContext");
|
|
16
12
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
C as SignatureFormProvider,
|
|
14
|
+
x as useSignatureForm
|
|
19
15
|
};
|
|
20
16
|
//# sourceMappingURL=useSignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
|
|
@@ -2,13 +2,14 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as r } from "react-i18next";
|
|
3
3
|
import { useEmployeeList as m } from "./useEmployeeList.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
5
6
|
import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
7
|
import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
function
|
|
8
|
+
function d() {
|
|
8
9
|
const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = p();
|
|
9
10
|
return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
|
|
10
11
|
}
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
d as Actions
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAA,IAAcC,EAAA,GAC5BC,IAAaC,EAAA;AAEnB,SAAIH,EAAU,WAAW,IAChB,OAIP,gBAAAI,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx as o, jsxs as B } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d } from "react";
|
|
3
|
-
import { useEmployeesListSuspense as C } from "
|
|
4
|
-
import { useEmployeesDeleteMutation as v } from "
|
|
5
|
-
import { useEmployeesUpdateOnboardingStatusMutation as G } from "
|
|
3
|
+
import { useEmployeesListSuspense as C } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeesList.js";
|
|
4
|
+
import { useEmployeesDeleteMutation as v } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeesDelete.js";
|
|
5
|
+
import { useEmployeesUpdateOnboardingStatusMutation as G } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeesUpdateOnboardingStatus.js";
|
|
6
6
|
import { EmployeeListProvider as Y } from "./useEmployeeList.js";
|
|
7
7
|
import { Actions as F } from "./Actions.js";
|
|
8
8
|
import { BaseComponent as U } from "../../Base/Base.js";
|
|
9
9
|
import { useBase as W } from "../../Base/useBase.js";
|
|
10
10
|
import { Flex as q } from "../../Common/Flex/Flex.js";
|
|
11
|
-
import "react-i18next";
|
|
12
11
|
import "classnames";
|
|
13
|
-
import { useI18n as j, useComponentDictionary as k } from "../../../i18n/I18n.js";
|
|
14
12
|
import { componentEvents as s, EmployeeOnboardingStatus as l } from "../../../shared/constants.js";
|
|
13
|
+
import { useI18n as j, useComponentDictionary as k } from "../../../i18n/I18n.js";
|
|
15
14
|
import { Head as H } from "./Head.js";
|
|
16
15
|
import { List as V } from "./List.js";
|
|
17
16
|
import { useFlow as z } from "../../Flow/useFlow.js";
|
|
@@ -94,12 +93,12 @@ function K({ companyId: n, className: m, children: c, dictionary: y }) {
|
|
|
94
93
|
}
|
|
95
94
|
) });
|
|
96
95
|
}
|
|
97
|
-
const
|
|
96
|
+
const ye = () => {
|
|
98
97
|
const { companyId: n, onEvent: m } = z();
|
|
99
98
|
return /* @__PURE__ */ o(J, { companyId: n, onEvent: m });
|
|
100
99
|
};
|
|
101
100
|
export {
|
|
102
101
|
J as EmployeeList,
|
|
103
|
-
|
|
102
|
+
ye as EmployeeListContextual
|
|
104
103
|
};
|
|
105
104
|
//# sourceMappingURL=EmployeeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/
|
|
1
|
+
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data } = useEmployeesListSuspense({ companyId, page: currentPage, per: itemsPerPage })\n const { httpMeta, showEmployees: employeeList } = data\n const employees = employeeList!\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","useEmployeesListSuspense","httpMeta","employeeList","employees","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;AA0BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAE/E,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAE1D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C,EAAE,MAAAG,MAASC,EAAyB,EAAE,WAAAf,GAAW,MAAMS,GAAa,KAAKG,GAAc,GACvF,EAAE,UAAAI,GAAU,eAAeC,EAAA,IAAiBH,GAC5CI,IAAYD,GAEZ,EAAE,aAAaE,EAAA,IAA2BC,EAAA,GAC1C,EAAE,aAAaC,EAAA,IACnBC,EAAA,GAEIC,IAAa,OAAOP,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC,GAEvEQ,IAA2B,CAACC,MAAqB;AACrD,IAAAZ,EAAgBY,CAAQ;AAAA,EAC1B,GACMC,IAAkB,MAAM;AAC5B,IAAAhB,EAAe,CAAC;AAAA,EAClB,GACMiB,IAAqB,MAAM;AAC/B,IAAAjB,EAAe,OAAY,KAAK,IAAIkB,IAAW,GAAG,CAAC,CAAC;AAAA,EACtD,GACMC,IAAiB,MAAM;AAC3B,IAAAnB,EAAe,OAAY,KAAK,IAAIkB,IAAW,GAAGL,CAAU,CAAC;AAAA,EAC/D,GACMO,IAAiB,MAAM;AAC3B,IAAApB,EAAea,CAAU;AAAA,EAC3B,GACMQ,IAAe,OAAOC,MAAiB;AAC3C,UAAMzB,EAAkByB,GAAM,OAAMC,MAAW;AAC7C,YAAMd,EAAuB;AAAA,QAC3B,SAAS,EAAE,YAAYc,EAAA;AAAA,MAAQ,CAChC,GAED3B,EAAQ4B,EAAgB,kBAAkB,EAAE,YAAYD,GAAS;AAAA,IACnE,CAAC;AAAA,EACH,GAEME,IAAe,OAAOrB,MAAiB;AAC3C,UAAMP,EAAkBO,GAAM,OAAMsB,MAAc;AAChD,YAAMC,EAAuB;AAAA,QAC3B,YAAAD;AAAA,QACA,QAAQE,EAAyB;AAAA,MAAA,CAClC,GACDhC,EAAQ4B,EAAgB,iBAAiB;AAAA,QACvC,YAAAE;AAAA,QACA,kBAAkBE,EAAyB;AAAA,MAAA,CAC5C;AAAA,IACH,CAAC;AAAA,EACH,GAEMC,IAA6B,OAAOzB,MAAiB;AACzD,UAAMP,EAAkBO,GAAM,OAAMsB,MAAc;AAChD,YAAMC,EAAuB;AAAA,QAC3B,YAAAD;AAAA,QACA,QAAQE,EAAyB;AAAA,MAAA,CAClC;AAAA,IACH,CAAC;AAAA,EACH,GACMD,IAAyB,OAAOvB,MAA2D;AAC/F,UAAMP,EAAkBO,GAAM,OAAO,EAAE,YAAAsB,GAAY,QAAAI,QAAa;AAC9D,YAAM,EAAE,0BAA0BC,EAAA,IAChC,MAAMpB,EAAuC;AAAA,QAC3C,SAAS,EAAE,YAAAe,GAAY,aAAa,EAAE,kBAAkBI,IAAO;AAAA,MAAE,CAClE;AACH,MAAAlC,EAAQ4B,EAAgB,oCAAoCO,CAAY;AAAA,IAC1E,CAAC;AAAA,EACH;AAWA,SACE,gBAAA5C,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAAC6C;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,YAPW,CAACV,GAAcW,MAAwC;AACxE,UAAArC,EAAQ4B,EAAgB,iBAAiB,EAAE,YAAYF,GAAM,kBAAAW,GAAkB;AAAA,QACjF;AAAA,QAMQ,WAfU,MAAM;AACtB,UAAArC,EAAQ4B,EAAgB,eAAe;AAAA,QACzC;AAAA,QAcQ,cAAAC;AAAA,QACA,cAAAJ;AAAA,QACA,WAAAb;AAAA,QACA,aAAAT;AAAA,QACA,YAAAc;AAAA,QACA,iBAAAG;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAE;AAAA,QACA,gBAAAC;AAAA,QACA,4BAAAS;AAAA,QACA,0BAAAf;AAAA,QACA,YAxBW,MAAM;AACvB,UAAAlB,EAAQ4B,EAAgB,wBAAwB;AAAA,QAClD;AAAA,MAsBQ;AAAA,MAGD,UAAAhC,KAGC,gBAAA0C,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAhD,EAACiD,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAKO,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAAjD,GAAW,SAAAM,EAAA,IAAY4C,EAAA;AAC/B,SAAO,gBAAArD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as n } from "react-i18next";
|
|
3
3
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
5
6
|
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
-
const
|
|
7
|
-
const { t } = n("Employee.EmployeeList"), o = m();
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
const f = () => {
|
|
8
|
+
const { t: e } = n("Employee.EmployeeList"), o = m();
|
|
9
|
+
return /* @__PURE__ */ t(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ t(o.Heading, { as: "h2", children: e("title") }) });
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
f as Head
|
|
12
13
|
};
|
|
13
14
|
//# sourceMappingURL=Head.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":";;;;;;AAKO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,OAAO,GAAE,GAC1C;AAEJ;"}
|
|
@@ -4,14 +4,14 @@ import { useState as T } from "react";
|
|
|
4
4
|
import k from "./List.module.scss.js";
|
|
5
5
|
import { useEmployeeList as w } from "./useEmployeeList.js";
|
|
6
6
|
import "classnames";
|
|
7
|
-
import {
|
|
7
|
+
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as B } from "../../../shared/constants.js";
|
|
8
|
+
import { EmptyData as M } from "../../Common/EmptyData/EmptyData.js";
|
|
8
9
|
import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
|
-
import { useComponentContext as
|
|
10
|
-
import { HamburgerMenu as
|
|
11
|
-
import { EmployeeOnboardingStatusBadge as
|
|
10
|
+
import { useComponentContext as y } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
|
+
import { HamburgerMenu as G } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
12
|
+
import { EmployeeOnboardingStatusBadge as R } from "../../Common/OnboardingStatusBadge/index.js";
|
|
12
13
|
import s from "../../../assets/icons/pencil.svg.js";
|
|
13
|
-
import
|
|
14
|
-
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as x } from "../../../shared/constants.js";
|
|
14
|
+
import x from "../../../assets/icons/trashcan.svg.js";
|
|
15
15
|
import { firstLastName as F } from "../../../helpers/formattedStrings.js";
|
|
16
16
|
import { useDataView as V } from "../../Common/DataView/useDataView.js";
|
|
17
17
|
import { DataView as j } from "../../Common/DataView/DataView.js";
|
|
@@ -31,7 +31,7 @@ const rt = () => {
|
|
|
31
31
|
currentPage: O,
|
|
32
32
|
totalPages: _,
|
|
33
33
|
handleSkip: D
|
|
34
|
-
} = w(), r =
|
|
34
|
+
} = w(), r = y(), { t: a } = A("Employee.EmployeeList"), [I, u] = T(/* @__PURE__ */ new Set()), { ...P } = V({
|
|
35
35
|
data: d,
|
|
36
36
|
columns: [
|
|
37
37
|
{
|
|
@@ -46,7 +46,7 @@ const rt = () => {
|
|
|
46
46
|
key: "status",
|
|
47
47
|
title: a("statusLabel"),
|
|
48
48
|
render: ({ onboarded: t, onboardingStatus: n }) => /* @__PURE__ */ e(
|
|
49
|
-
|
|
49
|
+
R,
|
|
50
50
|
{
|
|
51
51
|
onboarded: t,
|
|
52
52
|
onboardingStatus: n
|
|
@@ -62,7 +62,7 @@ const rt = () => {
|
|
|
62
62
|
p(t.uuid, t.onboardingStatus ?? void 0);
|
|
63
63
|
},
|
|
64
64
|
icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
|
|
65
|
-
}),
|
|
65
|
+
}), B.has(t.onboarding_status ?? "") && n.push({
|
|
66
66
|
label: a("cancelSelfOnboardingCta"),
|
|
67
67
|
onClick: async () => {
|
|
68
68
|
await b(t.uuid);
|
|
@@ -84,9 +84,9 @@ const rt = () => {
|
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
},
|
|
87
|
-
icon: /* @__PURE__ */ e(
|
|
87
|
+
icon: /* @__PURE__ */ e(x, { "aria-hidden": !0 })
|
|
88
88
|
}), /* @__PURE__ */ e(
|
|
89
|
-
|
|
89
|
+
G,
|
|
90
90
|
{
|
|
91
91
|
items: n,
|
|
92
92
|
triggerLabel: a("hamburgerTitle"),
|
|
@@ -103,7 +103,7 @@ const rt = () => {
|
|
|
103
103
|
currentPage: O,
|
|
104
104
|
totalPages: _
|
|
105
105
|
},
|
|
106
|
-
emptyState: () => /* @__PURE__ */ e(
|
|
106
|
+
emptyState: () => /* @__PURE__ */ e(M, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
|
|
107
107
|
/* @__PURE__ */ e(r.Button, { variant: "secondary", onClick: D, children: a("skipCta") }),
|
|
108
108
|
/* @__PURE__ */ e(r.Button, { variant: "primary", onClick: l, children: a("addEmployeeCTA") })
|
|
109
109
|
] }) })
|
|
@@ -2,19 +2,15 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-error-boundary";
|
|
4
4
|
import "react-i18next";
|
|
5
|
-
import "@gusto/embedded-api/models/errors/apierror";
|
|
6
|
-
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
-
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
5
|
import "../../Base/useBase.js";
|
|
10
6
|
import "../../../shared/constants.js";
|
|
11
7
|
import "classnames";
|
|
12
8
|
import "dompurify";
|
|
13
9
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
10
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
11
|
+
const [y, C] = o("EmployeeListContext");
|
|
16
12
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
C as EmployeeListProvider,
|
|
14
|
+
y as useEmployeeList
|
|
19
15
|
};
|
|
20
16
|
//# sourceMappingURL=useEmployeeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAsBA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Actions(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as r } from "react-i18next";
|
|
3
|
+
import { useFederalTaxes as i } from "./useFederalTaxes.js";
|
|
4
|
+
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
6
|
+
import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
+
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
function x() {
|
|
9
|
+
const { t } = r("Employee.FederalTaxes"), { isPending: n } = i(), e = s();
|
|
10
|
+
return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
x as Actions
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,WAAW,GAChB,GACF;AAEJ;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FederalFormSchema: z.ZodObject<{
|
|
3
|
+
filingStatus: z.ZodString;
|
|
4
|
+
twoJobs: z.ZodString;
|
|
5
|
+
dependentsAmount: z.ZodEffects<z.ZodNumber, string, number>;
|
|
6
|
+
otherIncome: z.ZodEffects<z.ZodNumber, string, number>;
|
|
7
|
+
deductions: z.ZodEffects<z.ZodNumber, string, number>;
|
|
8
|
+
extraWithholding: z.ZodEffects<z.ZodNumber, string, number>;
|
|
9
|
+
w4DataType: z.ZodEnum<["pre_2020_w4", "rev_2020_w4"]>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
deductions: string;
|
|
12
|
+
extraWithholding: string;
|
|
13
|
+
otherIncome: string;
|
|
14
|
+
filingStatus: string;
|
|
15
|
+
twoJobs: string;
|
|
16
|
+
dependentsAmount: string;
|
|
17
|
+
w4DataType: "pre_2020_w4" | "rev_2020_w4";
|
|
18
|
+
}, {
|
|
19
|
+
deductions: number;
|
|
20
|
+
extraWithholding: number;
|
|
21
|
+
otherIncome: number;
|
|
22
|
+
filingStatus: string;
|
|
23
|
+
twoJobs: string;
|
|
24
|
+
dependentsAmount: number;
|
|
25
|
+
w4DataType: "pre_2020_w4" | "rev_2020_w4";
|
|
26
|
+
}>;
|
|
27
|
+
export type FederalFormInputs = z.input<typeof FederalFormSchema>;
|
|
28
|
+
export type FederalFormPayload = z.output<typeof FederalFormSchema>;
|
|
29
|
+
export declare function FederalForm(): import("react/jsx-runtime").JSX.Element;
|