@gusto/embedded-react-sdk 0.11.3 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +181 -0
- package/dist/components/Base/Base.js +18 -19
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +1 -1
- package/dist/components/Common/DocumentList/DocumentList.module.scss.js +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.module.scss.js +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.module.scss.js +6 -6
- package/dist/components/Common/Flex/Flex.d.ts +2 -2
- package/dist/components/Common/Flex/Flex.js +5 -5
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/Form/Form.module.scss.js +2 -2
- package/dist/components/Common/Grid/Grid.d.ts +2 -2
- package/dist/components/Common/Grid/Grid.js +13 -13
- package/dist/components/Common/Grid/Grid.js.map +1 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.module.scss.js +12 -12
- package/dist/components/Common/InternalError/InternalError.module.scss.js +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.module.scss.js +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +15 -15
- package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +6 -6
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +1 -1
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +5 -5
- package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +8 -8
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.module.scss.js +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +5 -5
- package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
- package/dist/components/Common/UI/Link/Link.module.scss.js +1 -1
- package/dist/components/Common/UI/List/List.module.scss.js +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/NumberInput/NumberInput.js +36 -38
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +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/ProgressBar.module.scss.js +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +4 -0
- package/dist/components/Common/UI/Radio/Radio.module.scss.js +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroup.module.scss.js +1 -1
- package/dist/components/Common/UI/Select/Select.module.scss.js +1 -1
- package/dist/components/Common/UI/Switch/Switch.module.scss.js +4 -4
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Text/Text.module.scss.js +14 -14
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +6 -6
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +7 -7
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +3 -3
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +6 -7
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +7 -9
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +6 -7
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +3 -5
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
- package/dist/components/Company/Industry/Actions.js +5 -7
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -12
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
- 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 +3 -4
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +2 -4
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -9
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -12
- 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/Edit.module.scss.js +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +6 -8
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +8 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
- package/dist/components/Contractor/Address/Address.js +4 -5
- 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 +1 -1
- package/dist/components/Contractor/ContractorList/index.d.ts +16 -0
- package/dist/components/Contractor/ContractorList/index.js +124 -0
- package/dist/components/Contractor/ContractorList/index.js.map +1 -0
- package/dist/components/Contractor/{List → ContractorList}/useContractorList.d.ts +1 -3
- package/dist/components/Contractor/{List → ContractorList}/useContractorList.js +9 -10
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -0
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +2 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +26 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +27 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +91 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -0
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +9 -0
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +137 -0
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -7
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js +38 -17
- 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 +73 -74
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +29 -28
- package/dist/components/Contractor/Profile/useContractorProfile.js +158 -151
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.d.ts +7 -0
- package/dist/components/Contractor/Submit/Submit.js +76 -0
- package/dist/components/Contractor/Submit/Submit.js.map +1 -0
- package/dist/components/Contractor/Submit/SubmitDone.js +11 -11
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
- package/dist/components/Contractor/index.d.ts +3 -2
- package/dist/components/Contractor/index.js +10 -8
- package/dist/components/Contractor/index.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +5 -6
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -15
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -25
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +8 -14
- package/dist/components/Employee/Deductions/Deductions.js +47 -140
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +23 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js +31 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +41 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +134 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +6 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +98 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +15 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +48 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.d.ts +7 -0
- package/dist/components/Employee/Deductions/stateMachine.js +107 -0
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -0
- package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +6 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +4 -6
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +5 -7
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +14 -15
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
- package/dist/components/Employee/Landing/Landing.js +12 -13
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +6 -6
- package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -10
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +10 -11
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
- package/dist/components/Employee/Profile/Actions.js +7 -9
- 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/AdminPersonalDetails.js +9 -10
- 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.d.ts +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
- package/dist/components/Employee/Profile/useProfile.js +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -10
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +12 -14
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +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 +78 -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 +21 -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 +49 -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 +68 -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/GustoProvider/GustoProviderCustomUIAdapter.d.ts +3 -3
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +5 -7
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +1 -5
- package/dist/contexts/ThemeProvider/ThemeProvider.js +18 -60
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +42 -11
- package/dist/contexts/ThemeProvider/theme.js +31 -15
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/responsive.d.ts +0 -3
- package/dist/helpers/responsive.js +20 -34
- package/dist/helpers/responsive.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 +16 -10
- 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/Contractor.Submit.json.js +22 -0
- package/dist/i18n/en/Contractor.Submit.json.js.map +1 -0
- package/dist/i18n/en/Employee.Deductions.json.js +49 -51
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +46 -2
- package/dist/shared/constants.js +82 -45
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +27 -17
- package/package.json +9 -8
- package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js +0 -8
- package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js.map +0 -1
- package/dist/components/Contractor/List/index.d.ts +0 -25
- package/dist/components/Contractor/List/index.js +0 -81
- package/dist/components/Contractor/List/index.js.map +0 -1
- package/dist/components/Contractor/List/useContractorList.js.map +0 -1
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.d.ts +0 -6
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js +0 -27
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +0 -1
- package/dist/components/Contractor/Submit/index.d.ts +0 -6
- package/dist/components/Contractor/Submit/index.js +0 -20
- package/dist/components/Contractor/Submit/index.js.map +0 -1
- package/dist/components/Contractor/Submit/index.module.scss.js +0 -8
- package/dist/components/Contractor/Submit/index.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.js +0 -27
- package/dist/components/Employee/Deductions/Actions.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionForm.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionForm.js +0 -78
- package/dist/components/Employee/Deductions/DeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsList.d.ts +0 -2
- package/dist/components/Employee/Deductions/DeductionsList.js +0 -60
- package/dist/components/Employee/Deductions/DeductionsList.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.js +0 -13
- package/dist/components/Employee/Deductions/Head.js.map +0 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.d.ts +0 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +0 -27
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +0 -1
- package/dist/components/Employee/Deductions/useDeductions.js +0 -33
- package/dist/components/Employee/Deductions/useDeductions.js.map +0 -1
- package/dist/contexts/ThemeProvider/createTheme.d.ts +0 -21
- package/dist/contexts/ThemeProvider/createTheme.js +0 -269
- package/dist/contexts/ThemeProvider/createTheme.js.map +0 -1
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js +0 -18
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +0 -1
- package/dist/types/GTheme.d.ts +0 -254
- /package/dist/contexts/ThemeProvider/{createTheme.test.d.ts → theme.test.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Profile/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useProfile } from './useProfile'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Employee.Profile')\n const { isPending } = useProfile()\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","useProfile","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Profile/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useProfile } from './useProfile'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Employee.Profile')\n const { isPending } = useProfile()\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","useProfile","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,kBAAkB,GACzC,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;"}
|
|
@@ -13,17 +13,17 @@ export declare const AdminSelfOnboardingPersonalDetailsSchema: z.ZodObject<{
|
|
|
13
13
|
email: string;
|
|
14
14
|
firstName: string;
|
|
15
15
|
lastName: string;
|
|
16
|
-
workAddress: string;
|
|
17
16
|
selfOnboarding: boolean;
|
|
17
|
+
workAddress: string;
|
|
18
18
|
middleInitial?: string | undefined;
|
|
19
19
|
startDate?: string | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
email: string;
|
|
22
22
|
firstName: string;
|
|
23
23
|
lastName: string;
|
|
24
|
+
selfOnboarding: boolean;
|
|
24
25
|
startDate: Date;
|
|
25
26
|
workAddress: string;
|
|
26
|
-
selfOnboarding: boolean;
|
|
27
27
|
middleInitial?: string | undefined;
|
|
28
28
|
}>;
|
|
29
29
|
export declare const AdminPersonalDetailsSchema: z.ZodDiscriminatedUnion<"enableSsn", [z.ZodObject<{
|
|
@@ -43,9 +43,9 @@ export declare const AdminPersonalDetailsSchema: z.ZodDiscriminatedUnion<"enable
|
|
|
43
43
|
ssn: string;
|
|
44
44
|
firstName: string;
|
|
45
45
|
lastName: string;
|
|
46
|
+
selfOnboarding: boolean;
|
|
46
47
|
workAddress: string;
|
|
47
48
|
enableSsn: true;
|
|
48
|
-
selfOnboarding: boolean;
|
|
49
49
|
middleInitial?: string | undefined;
|
|
50
50
|
startDate?: string | undefined;
|
|
51
51
|
dateOfBirth?: string | undefined;
|
|
@@ -54,11 +54,11 @@ export declare const AdminPersonalDetailsSchema: z.ZodDiscriminatedUnion<"enable
|
|
|
54
54
|
ssn: string;
|
|
55
55
|
firstName: string;
|
|
56
56
|
lastName: string;
|
|
57
|
+
selfOnboarding: boolean;
|
|
57
58
|
startDate: Date;
|
|
58
59
|
workAddress: string;
|
|
59
60
|
enableSsn: true;
|
|
60
61
|
dateOfBirth: Date;
|
|
61
|
-
selfOnboarding: boolean;
|
|
62
62
|
middleInitial?: string | undefined;
|
|
63
63
|
}>, z.ZodObject<{
|
|
64
64
|
workAddress: z.ZodString;
|
|
@@ -78,9 +78,9 @@ export declare const AdminPersonalDetailsSchema: z.ZodDiscriminatedUnion<"enable
|
|
|
78
78
|
email: string;
|
|
79
79
|
firstName: string;
|
|
80
80
|
lastName: string;
|
|
81
|
+
selfOnboarding: boolean;
|
|
81
82
|
workAddress: string;
|
|
82
83
|
enableSsn: false;
|
|
83
|
-
selfOnboarding: boolean;
|
|
84
84
|
middleInitial?: string | undefined;
|
|
85
85
|
startDate?: string | undefined;
|
|
86
86
|
dateOfBirth?: string | undefined;
|
|
@@ -88,11 +88,11 @@ export declare const AdminPersonalDetailsSchema: z.ZodDiscriminatedUnion<"enable
|
|
|
88
88
|
email: string;
|
|
89
89
|
firstName: string;
|
|
90
90
|
lastName: string;
|
|
91
|
+
selfOnboarding: boolean;
|
|
91
92
|
startDate: Date;
|
|
92
93
|
workAddress: string;
|
|
93
94
|
enableSsn: false;
|
|
94
95
|
dateOfBirth: Date;
|
|
95
|
-
selfOnboarding: boolean;
|
|
96
96
|
middleInitial?: string | undefined;
|
|
97
97
|
}>]>;
|
|
98
98
|
export declare const AdminPersonalDetails: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -3,23 +3,22 @@ import { useEffect as g } from "react";
|
|
|
3
3
|
import { useFormContext as h } from "react-hook-form";
|
|
4
4
|
import { useTranslation as O } from "react-i18next";
|
|
5
5
|
import { z as t } from "zod";
|
|
6
|
-
import { AdminInputsSchema as D, SocialSecurityNumberSchema as I, DateOfBirthSchema as
|
|
6
|
+
import { AdminInputsSchema as D, SocialSecurityNumberSchema as I, DateOfBirthSchema as l, NameInputsSchema as A, NameInputs as N, AdminInputs as E, SocialSecurityNumberInput as x, DateOfBirthInput as y } from "./PersonalDetailsInputs.js";
|
|
7
7
|
import { useProfile as P } from "./useProfile.js";
|
|
8
|
-
import { EmployeeOnboardingStatus as
|
|
9
|
-
import "classnames";
|
|
8
|
+
import { EmployeeOnboardingStatus as m } from "../../../shared/constants.js";
|
|
10
9
|
import { CheckboxField as F } from "../../Common/Fields/CheckboxField/CheckboxField.js";
|
|
11
10
|
const d = D.merge(
|
|
12
11
|
A
|
|
13
12
|
).extend({
|
|
14
13
|
selfOnboarding: t.boolean()
|
|
15
|
-
}),
|
|
16
|
-
d.merge(I).merge(
|
|
14
|
+
}), M = t.discriminatedUnion("enableSsn", [
|
|
15
|
+
d.merge(I).merge(l).extend({
|
|
17
16
|
enableSsn: t.literal(!0)
|
|
18
17
|
}),
|
|
19
|
-
d.merge(
|
|
18
|
+
d.merge(l).extend({
|
|
20
19
|
enableSsn: t.literal(!1)
|
|
21
20
|
})
|
|
22
|
-
]),
|
|
21
|
+
]), V = () => {
|
|
23
22
|
const { companyLocations: c, employee: e, isAdmin: f, isSelfOnboardingEnabled: S } = P(), { t: b } = O("Employee.Profile"), { watch: u, setValue: o, getFieldState: p } = h(), r = u("selfOnboarding"), { isDirty: i } = p("ssn");
|
|
24
23
|
return g(() => {
|
|
25
24
|
r ? o("enableSsn", !1) : o("enableSsn", i ? !0 : !e?.hasSsn);
|
|
@@ -31,7 +30,7 @@ const d = D.merge(
|
|
|
31
30
|
{
|
|
32
31
|
name: "selfOnboarding",
|
|
33
32
|
label: b("selfOnboardingLabel"),
|
|
34
|
-
isDisabled: e?.onboarded || e?.onboardingStatus ===
|
|
33
|
+
isDisabled: e?.onboarded || e?.onboardingStatus === m.ONBOARDING_COMPLETED || e?.onboardingStatus === m.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
|
|
35
34
|
}
|
|
36
35
|
),
|
|
37
36
|
!r && /* @__PURE__ */ a(s, { children: [
|
|
@@ -41,8 +40,8 @@ const d = D.merge(
|
|
|
41
40
|
] }) : null;
|
|
42
41
|
};
|
|
43
42
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
V as AdminPersonalDetails,
|
|
44
|
+
M as AdminPersonalDetailsSchema,
|
|
46
45
|
d as AdminSelfOnboardingPersonalDetailsSchema
|
|
47
46
|
};
|
|
48
47
|
//# sourceMappingURL=AdminPersonalDetails.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminPersonalDetails.js","sources":["../../../../src/components/Employee/Profile/AdminPersonalDetails.tsx"],"sourcesContent":["import { useEffect } from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport {\n AdminInputs,\n AdminInputsSchema,\n NameInputs,\n NameInputsSchema,\n SocialSecurityNumberInput,\n SocialSecurityNumberSchema,\n DateOfBirthInput,\n DateOfBirthSchema,\n type PersonalDetailsInputs,\n} from './PersonalDetailsInputs'\nimport { useProfile } from './useProfile'\nimport { EmployeeOnboardingStatus } from '@/shared/constants'\nimport { CheckboxField } from '@/components/Common'\n\nexport const AdminSelfOnboardingPersonalDetailsSchema = AdminInputsSchema.merge(\n NameInputsSchema,\n).extend({\n selfOnboarding: z.boolean(),\n})\n\nexport const AdminPersonalDetailsSchema = z.discriminatedUnion('enableSsn', [\n AdminSelfOnboardingPersonalDetailsSchema.merge(SocialSecurityNumberSchema)\n .merge(DateOfBirthSchema)\n .extend({\n enableSsn: z.literal(true),\n }),\n AdminSelfOnboardingPersonalDetailsSchema.merge(DateOfBirthSchema).extend({\n enableSsn: z.literal(false),\n }),\n])\n\nexport const AdminPersonalDetails = () => {\n const { companyLocations, employee, isAdmin, isSelfOnboardingEnabled } = useProfile()\n const { t } = useTranslation('Employee.Profile')\n const { watch, setValue, getFieldState } = useFormContext<PersonalDetailsInputs>()\n\n const isSelfOnboardingChecked = watch('selfOnboarding')\n const { isDirty: isSsnDirty } = getFieldState('ssn')\n\n useEffect(() => {\n if (isSelfOnboardingChecked) {\n setValue('enableSsn', false)\n } else {\n setValue('enableSsn', isSsnDirty ? true : !employee?.hasSsn)\n }\n }, [isSelfOnboardingChecked, employee?.hasSsn, isSsnDirty, setValue])\n\n if (!isAdmin) {\n return null\n }\n\n return (\n <>\n <NameInputs />\n <AdminInputs companyLocations={companyLocations} />\n {isSelfOnboardingEnabled && (\n <CheckboxField\n name=\"selfOnboarding\"\n label={t('selfOnboardingLabel')}\n isDisabled={\n employee?.onboarded ||\n employee?.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED ||\n employee?.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW\n }\n />\n )}\n\n {!isSelfOnboardingChecked && (\n <>\n <SocialSecurityNumberInput employee={employee} />\n <DateOfBirthInput />\n </>\n )}\n </>\n )\n}\n"],"names":["AdminSelfOnboardingPersonalDetailsSchema","AdminInputsSchema","NameInputsSchema","z","AdminPersonalDetailsSchema","SocialSecurityNumberSchema","DateOfBirthSchema","AdminPersonalDetails","companyLocations","employee","isAdmin","isSelfOnboardingEnabled","useProfile","t","useTranslation","watch","setValue","getFieldState","useFormContext","isSelfOnboardingChecked","isSsnDirty","useEffect","jsxs","Fragment","jsx","NameInputs","AdminInputs","CheckboxField","EmployeeOnboardingStatus","SocialSecurityNumberInput","DateOfBirthInput"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdminPersonalDetails.js","sources":["../../../../src/components/Employee/Profile/AdminPersonalDetails.tsx"],"sourcesContent":["import { useEffect } from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport {\n AdminInputs,\n AdminInputsSchema,\n NameInputs,\n NameInputsSchema,\n SocialSecurityNumberInput,\n SocialSecurityNumberSchema,\n DateOfBirthInput,\n DateOfBirthSchema,\n type PersonalDetailsInputs,\n} from './PersonalDetailsInputs'\nimport { useProfile } from './useProfile'\nimport { EmployeeOnboardingStatus } from '@/shared/constants'\nimport { CheckboxField } from '@/components/Common'\n\nexport const AdminSelfOnboardingPersonalDetailsSchema = AdminInputsSchema.merge(\n NameInputsSchema,\n).extend({\n selfOnboarding: z.boolean(),\n})\n\nexport const AdminPersonalDetailsSchema = z.discriminatedUnion('enableSsn', [\n AdminSelfOnboardingPersonalDetailsSchema.merge(SocialSecurityNumberSchema)\n .merge(DateOfBirthSchema)\n .extend({\n enableSsn: z.literal(true),\n }),\n AdminSelfOnboardingPersonalDetailsSchema.merge(DateOfBirthSchema).extend({\n enableSsn: z.literal(false),\n }),\n])\n\nexport const AdminPersonalDetails = () => {\n const { companyLocations, employee, isAdmin, isSelfOnboardingEnabled } = useProfile()\n const { t } = useTranslation('Employee.Profile')\n const { watch, setValue, getFieldState } = useFormContext<PersonalDetailsInputs>()\n\n const isSelfOnboardingChecked = watch('selfOnboarding')\n const { isDirty: isSsnDirty } = getFieldState('ssn')\n\n useEffect(() => {\n if (isSelfOnboardingChecked) {\n setValue('enableSsn', false)\n } else {\n setValue('enableSsn', isSsnDirty ? true : !employee?.hasSsn)\n }\n }, [isSelfOnboardingChecked, employee?.hasSsn, isSsnDirty, setValue])\n\n if (!isAdmin) {\n return null\n }\n\n return (\n <>\n <NameInputs />\n <AdminInputs companyLocations={companyLocations} />\n {isSelfOnboardingEnabled && (\n <CheckboxField\n name=\"selfOnboarding\"\n label={t('selfOnboardingLabel')}\n isDisabled={\n employee?.onboarded ||\n employee?.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED ||\n employee?.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW\n }\n />\n )}\n\n {!isSelfOnboardingChecked && (\n <>\n <SocialSecurityNumberInput employee={employee} />\n <DateOfBirthInput />\n </>\n )}\n </>\n )\n}\n"],"names":["AdminSelfOnboardingPersonalDetailsSchema","AdminInputsSchema","NameInputsSchema","z","AdminPersonalDetailsSchema","SocialSecurityNumberSchema","DateOfBirthSchema","AdminPersonalDetails","companyLocations","employee","isAdmin","isSelfOnboardingEnabled","useProfile","t","useTranslation","watch","setValue","getFieldState","useFormContext","isSelfOnboardingChecked","isSsnDirty","useEffect","jsxs","Fragment","jsx","NameInputs","AdminInputs","CheckboxField","EmployeeOnboardingStatus","SocialSecurityNumberInput","DateOfBirthInput"],"mappings":";;;;;;;;;AAmBO,MAAMA,IAA2CC,EAAkB;AAAA,EACxEC;AACF,EAAE,OAAO;AAAA,EACP,gBAAgBC,EAAE,QAAA;AACpB,CAAC,GAEYC,IAA6BD,EAAE,mBAAmB,aAAa;AAAA,EAC1EH,EAAyC,MAAMK,CAA0B,EACtE,MAAMC,CAAiB,EACvB,OAAO;AAAA,IACN,WAAWH,EAAE,QAAQ,EAAI;AAAA,EAAA,CAC1B;AAAA,EACHH,EAAyC,MAAMM,CAAiB,EAAE,OAAO;AAAA,IACvE,WAAWH,EAAE,QAAQ,EAAK;AAAA,EAAA,CAC3B;AACH,CAAC,GAEYI,IAAuB,MAAM;AACxC,QAAM,EAAE,kBAAAC,GAAkB,UAAAC,GAAU,SAAAC,GAAS,yBAAAC,EAAA,IAA4BC,EAAA,GACnE,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,GAAO,UAAAC,GAAU,eAAAC,EAAA,IAAkBC,EAAA,GAErCC,IAA0BJ,EAAM,gBAAgB,GAChD,EAAE,SAASK,MAAeH,EAAc,KAAK;AAUnD,SARAI,EAAU,MAAM;AACd,IAAIF,IACFH,EAAS,aAAa,EAAK,IAE3BA,EAAS,aAAaI,IAAa,KAAO,CAACX,GAAU,MAAM;AAAA,EAE/D,GAAG,CAACU,GAAyBV,GAAU,QAAQW,GAAYJ,CAAQ,CAAC,GAE/DN,IAKH,gBAAAY,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW;AAAA,IACZ,gBAAAD,EAACE,KAAY,kBAAAlB,GAAoC;AAAA,IAChDG,KACC,gBAAAa;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOd,EAAE,qBAAqB;AAAA,QAC9B,YACEJ,GAAU,aACVA,GAAU,qBAAqBmB,EAAyB,wBACxDnB,GAAU,qBACRmB,EAAyB;AAAA,MAAA;AAAA,IAAA;AAAA,IAKhC,CAACT,KACA,gBAAAG,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAC,EAACK,KAA0B,UAAApB,GAAoB;AAAA,wBAC9CqB,GAAA,CAAA,CAAiB;AAAA,IAAA,EAAA,CACpB;AAAA,EAAA,GAEJ,IA1BO;AA4BX;"}
|
|
@@ -5,8 +5,8 @@ import { z as t } from "zod";
|
|
|
5
5
|
import { useProfile as g } from "./useProfile.js";
|
|
6
6
|
import { STATES_ABBR as f } from "../../../shared/constants.js";
|
|
7
7
|
import { Grid as b } from "../../Common/Grid/Grid.js";
|
|
8
|
-
import { TextInputField as n } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
9
8
|
import { useComponentContext as y } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
|
+
import { TextInputField as n } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
10
10
|
import { SelectField as T } from "../../Common/Fields/SelectField/SelectField.js";
|
|
11
11
|
import { CheckboxField as x } from "../../Common/Fields/CheckboxField/CheckboxField.js";
|
|
12
12
|
const j = t.union([
|
|
@@ -72,9 +72,9 @@ declare const PersonalDetailsTotalSchema: z.ZodObject<{
|
|
|
72
72
|
ssn: string;
|
|
73
73
|
firstName: string;
|
|
74
74
|
lastName: string;
|
|
75
|
+
selfOnboarding: boolean;
|
|
75
76
|
workAddress: string;
|
|
76
77
|
enableSsn: boolean;
|
|
77
|
-
selfOnboarding: boolean;
|
|
78
78
|
middleInitial?: string | undefined;
|
|
79
79
|
startDate?: string | undefined;
|
|
80
80
|
dateOfBirth?: string | undefined;
|
|
@@ -83,11 +83,11 @@ declare const PersonalDetailsTotalSchema: z.ZodObject<{
|
|
|
83
83
|
ssn: string;
|
|
84
84
|
firstName: string;
|
|
85
85
|
lastName: string;
|
|
86
|
+
selfOnboarding: boolean;
|
|
86
87
|
startDate: Date;
|
|
87
88
|
workAddress: string;
|
|
88
89
|
enableSsn: boolean;
|
|
89
90
|
dateOfBirth: Date;
|
|
90
|
-
selfOnboarding: boolean;
|
|
91
91
|
middleInitial?: string | undefined;
|
|
92
92
|
}>;
|
|
93
93
|
type NullableDatesMapper<Source> = {
|
|
@@ -3,12 +3,12 @@ import { z as t } from "zod";
|
|
|
3
3
|
import { useFormContext as c } from "react-hook-form";
|
|
4
4
|
import { useTranslation as o } from "react-i18next";
|
|
5
5
|
import { Grid as b } from "../../Common/Grid/Grid.js";
|
|
6
|
-
import { TextInputField as i } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
7
|
-
import { DatePickerField as u } from "../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
8
6
|
import { removeNonDigits as S, addressInline as g } from "../../../helpers/formattedStrings.js";
|
|
9
7
|
import { usePlaceholderSSN as h, normalizeSSN as N } from "../../../helpers/ssn.js";
|
|
10
8
|
import { SSN_REGEX as D, nameValidation as m } from "../../../helpers/validations.js";
|
|
9
|
+
import { TextInputField as i } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
11
10
|
import { SelectField as I } from "../../Common/Fields/SelectField/SelectField.js";
|
|
11
|
+
import { DatePickerField as u } from "../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
12
12
|
const v = t.object({
|
|
13
13
|
firstName: m,
|
|
14
14
|
middleInitial: t.string().optional(),
|
|
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../Base/useBase.js";
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
|
-
import "classnames";
|
|
12
11
|
import "dompurify";
|
|
13
12
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
14
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
15
|
const [s, u] = o("ProfileContext");
|
|
16
16
|
export {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useTaxes as
|
|
4
|
-
import "
|
|
5
|
-
import "../../../
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const { t } = r("Employee.Taxes"), { isPending: n } = s(), i = e();
|
|
10
|
-
return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(i.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
|
+
import { useTaxes as i } from "./useTaxes.js";
|
|
4
|
+
import { ActionsLayout as r } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
5
|
+
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
const x = () => {
|
|
7
|
+
const { t } = e("Employee.Taxes"), { isPending: n } = i(), s = m();
|
|
8
|
+
return /* @__PURE__ */ o(r, { children: /* @__PURE__ */ o(s.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
|
|
11
9
|
};
|
|
12
10
|
export {
|
|
13
|
-
|
|
11
|
+
x as Actions
|
|
14
12
|
};
|
|
15
13
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Taxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useTaxes } from './useTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Employee.Taxes')\n const { isPending } = useTaxes()\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","useTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Taxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useTaxes } from './useTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Employee.Taxes')\n const { isPending } = useTaxes()\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","useTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,gBAAgB,GACvC,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;"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as s, Trans as
|
|
2
|
+
import { useTranslation as s, Trans as u } from "react-i18next";
|
|
3
3
|
import { z as t } from "zod";
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import { RadioGroupField as
|
|
4
|
+
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
|
+
import { SelectField as d } from "../../Common/Fields/SelectField/SelectField.js";
|
|
6
|
+
import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
7
7
|
import { NumberInputField as i } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
8
|
-
|
|
9
|
-
import { SelectField as f } from "../../Common/Fields/SelectField/SelectField.js";
|
|
10
|
-
const q = t.object({
|
|
8
|
+
const F = t.object({
|
|
11
9
|
filingStatus: t.string().min(1),
|
|
12
10
|
twoJobs: t.string().min(1),
|
|
13
11
|
dependentsAmount: t.number().transform(String),
|
|
@@ -16,8 +14,8 @@ const q = t.object({
|
|
|
16
14
|
extraWithholding: t.number().transform(String),
|
|
17
15
|
w4DataType: t.enum(["pre_2020_w4", "rev_2020_w4"])
|
|
18
16
|
});
|
|
19
|
-
function
|
|
20
|
-
const { t: e } = s("Employee.Taxes"), o =
|
|
17
|
+
function R() {
|
|
18
|
+
const { t: e } = s("Employee.Taxes"), o = m(), n = [
|
|
21
19
|
{ value: "Single", label: e("filingStatusSingle") },
|
|
22
20
|
{ value: "Married", label: e("filingStatusMarried") },
|
|
23
21
|
{ value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
|
|
@@ -25,7 +23,7 @@ function v() {
|
|
|
25
23
|
];
|
|
26
24
|
return /* @__PURE__ */ l(a, { children: [
|
|
27
25
|
/* @__PURE__ */ r(
|
|
28
|
-
|
|
26
|
+
d,
|
|
29
27
|
{
|
|
30
28
|
name: "filingStatus",
|
|
31
29
|
label: e("federalFilingStatus1c"),
|
|
@@ -36,14 +34,14 @@ function v() {
|
|
|
36
34
|
}
|
|
37
35
|
),
|
|
38
36
|
/* @__PURE__ */ r(
|
|
39
|
-
|
|
37
|
+
f,
|
|
40
38
|
{
|
|
41
39
|
name: "twoJobs",
|
|
42
40
|
isRequired: !0,
|
|
43
41
|
label: e("multipleJobs2c"),
|
|
44
42
|
errorMessage: e("validations.federalTwoJobs"),
|
|
45
43
|
description: /* @__PURE__ */ r(o.Text, { children: /* @__PURE__ */ r(
|
|
46
|
-
|
|
44
|
+
u,
|
|
47
45
|
{
|
|
48
46
|
i18nKey: "includesSpouseExplanation",
|
|
49
47
|
t: e,
|
|
@@ -103,7 +101,7 @@ function v() {
|
|
|
103
101
|
] });
|
|
104
102
|
}
|
|
105
103
|
export {
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
R as FederalForm,
|
|
105
|
+
F as FederalFormSchema
|
|
108
106
|
};
|
|
109
107
|
//# sourceMappingURL=FederalForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/Taxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { NumberInputField, RadioGroupField, SelectField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const FederalFormSchema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n w4DataType: z.enum(['pre_2020_w4', 'rev_2020_w4']),\n})\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.Taxes')\n const Components = useComponentContext()\n\n const filingStatusCategories = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFillingStatusPlaceholder')}\n options={filingStatusCategories}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Components.Text>\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\n </Components.Text>\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["FederalFormSchema","z","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusCategories","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/Taxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { NumberInputField, RadioGroupField, SelectField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const FederalFormSchema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n w4DataType: z.enum(['pre_2020_w4', 'rev_2020_w4']),\n})\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.Taxes')\n const Components = useComponentContext()\n\n const filingStatusCategories = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFillingStatusPlaceholder')}\n options={filingStatusCategories}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Components.Text>\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\n </Components.Text>\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["FederalFormSchema","z","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusCategories","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":";;;;;;;AAKO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,aAAaA,EAAE,SAAS,UAAU,MAAM;AAAA,EACxC,YAAYA,EAAE,SAAS,UAAU,MAAM;AAAA,EACvC,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,YAAYA,EAAE,KAAK,CAAC,eAAe,aAAa,CAAC;AACnD,CAAC;AAKM,SAASC,IAAc;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gBAAgB,GACvCC,IAAaC,EAAA,GAEbC,IAAyB;AAAA,IAC7B,EAAE,OAAO,UAAU,OAAOJ,EAAE,oBAAoB,EAAA;AAAA,IAChD,EAAE,OAAO,WAAW,OAAOA,EAAE,qBAAqB,EAAA;AAAA,IAClD,EAAE,OAAO,qBAAqB,OAAOA,EAAE,6BAA6B,EAAA;AAAA,IACpE,EAAE,OAAO,2BAA2B,OAAOA,EAAE,mCAAmC,EAAA;AAAA,EAAE;AAGpF,SACE,gBAAAK,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR,EAAE,uBAAuB;AAAA,QAChC,aAAaA,EAAE,iCAAiC;AAAA,QAChD,SAASI;AAAA,QACT,YAAU;AAAA,QACV,cAAcJ,EAAE,iCAAiC;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnD,gBAAAO;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOT,EAAE,gBAAgB;AAAA,QACzB,cAAcA,EAAE,4BAA4B;AAAA,QAC5C,aACE,gBAAAO,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,UAAU,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UAC7B;AAAA,QAAA,GAEJ;AAAA,QAEF,SAAS;AAAA,UACP,EAAE,OAAO,QAAQ,OAAOF,EAAE,gBAAgB,EAAA;AAAA,UAC1C,EAAE,OAAO,SAAS,OAAOA,EAAE,eAAe,EAAA;AAAA,QAAE;AAAA,MAC9C;AAAA,IAAA;AAAA,IAEF,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,6BAA6B;AAAA,QACtC,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,aAAa;AAAA,QACtB,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,YAAY;AAAA,QACrB,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,kBAAkB;AAAA,QAC3B,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
|
|
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../Base/useBase.js";
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
|
-
import "classnames";
|
|
12
11
|
import "dompurify";
|
|
13
12
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
14
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
15
|
const [u, f] = o("TaxesContext");
|
|
16
16
|
export {
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import { jsx as s, Fragment as d, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { useMachine as h } from "react-robot";
|
|
3
3
|
import { useTranslation as g } from "react-i18next";
|
|
4
|
-
import { FlowContext as
|
|
5
|
-
import { useComponentContext as
|
|
6
|
-
const
|
|
7
|
-
const p =
|
|
4
|
+
import { FlowContext as C } from "./useFlow.js";
|
|
5
|
+
import { useComponentContext as v } from "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
const b = ({ onEvent: l, machine: a }) => {
|
|
7
|
+
const p = v(), { t: m } = g(), [o, i, c] = h(a, {
|
|
8
8
|
onEvent: x,
|
|
9
|
-
component: null
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
component: null,
|
|
10
|
+
progressBarCta: null
|
|
11
|
+
}), u = o.context.showProgress ?? !1, t = o.context.totalSteps ?? null, e = o.context.currentStep ?? null;
|
|
12
|
+
function x(n, r) {
|
|
13
|
+
c.child ? c.child.send({ type: n, payload: r }) : i({ type: n, payload: r }), l(n, r);
|
|
13
14
|
}
|
|
14
15
|
return /* @__PURE__ */ s(d, { children: /* @__PURE__ */ f(
|
|
15
|
-
|
|
16
|
+
C.Provider,
|
|
16
17
|
{
|
|
17
18
|
value: {
|
|
18
19
|
...o.context
|
|
19
20
|
},
|
|
20
21
|
children: [
|
|
21
|
-
u &&
|
|
22
|
+
u && e && t && /* @__PURE__ */ s(
|
|
22
23
|
p.ProgressBar,
|
|
23
24
|
{
|
|
24
25
|
totalSteps: t,
|
|
25
|
-
currentStep:
|
|
26
|
-
label:
|
|
26
|
+
currentStep: e,
|
|
27
|
+
label: m("progressBarLabel", { totalSteps: t, currentStep: e }),
|
|
28
|
+
cta: o.context.progressBarCta
|
|
27
29
|
}
|
|
28
30
|
),
|
|
29
31
|
o.context.component && /* @__PURE__ */ s(o.context.component, {})
|
|
@@ -32,6 +34,6 @@ const j = ({ onEvent: l, machine: m }) => {
|
|
|
32
34
|
) });
|
|
33
35
|
};
|
|
34
36
|
export {
|
|
35
|
-
|
|
37
|
+
b as Flow
|
|
36
38
|
};
|
|
37
39
|
//# sourceMappingURL=Flow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps = {\n machine: Machine<object, FlowContextInterface>\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = ({ onEvent, machine }: FlowProps) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n })\n\n const showProgress = current.context.showProgress ?? false\n const totalSteps = current.context.totalSteps ?? null\n const currentStep = current.context.currentStep ?? null\n\n function handleEvent(type: EventType, data: unknown): void {\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n //@ts-expect-error: not sure why 'type' type is incorrectly derived here\n service.child.send({ type: type, payload: data })\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n send({ type: type, payload: data })\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n {showProgress && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n />\n )}\n {current.context.component && <current.context.component />}\n </FlowContext.Provider>\n </>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","showProgress","totalSteps","currentStep","type","data","jsx","Fragment","jsxs","FlowContext"],"mappings":";;;;;AAcO,MAAMA,IAAO,CAAC,EAAE,SAAAC,GAAS,SAAAC,QAAyB;AACvD,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAASC,GAAMC,CAAO,IAAIC,EAAWR,GAAS;AAAA,IACnD,SAASS;AAAA,IACT,WAAW;AAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps = {\n machine: Machine<object, FlowContextInterface>\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = ({ onEvent, machine }: FlowProps) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const showProgress = current.context.showProgress ?? false\n const totalSteps = current.context.totalSteps ?? null\n const currentStep = current.context.currentStep ?? null\n\n function handleEvent(type: EventType, data: unknown): void {\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n //@ts-expect-error: not sure why 'type' type is incorrectly derived here\n service.child.send({ type: type, payload: data })\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n send({ type: type, payload: data })\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n {showProgress && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {current.context.component && <current.context.component />}\n </FlowContext.Provider>\n </>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","showProgress","totalSteps","currentStep","type","data","jsx","Fragment","jsxs","FlowContext"],"mappings":";;;;;AAcO,MAAMA,IAAO,CAAC,EAAE,SAAAC,GAAS,SAAAC,QAAyB;AACvD,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAASC,GAAMC,CAAO,IAAIC,EAAWR,GAAS;AAAA,IACnD,SAASS;AAAA,IACT,WAAW;AAAA,IACX,gBAAgB;AAAA,EAAA,CACjB,GAEKC,IAAeL,EAAQ,QAAQ,gBAAgB,IAC/CM,IAAaN,EAAQ,QAAQ,cAAc,MAC3CO,IAAcP,EAAQ,QAAQ,eAAe;AAEnD,WAASI,EAAYI,GAAiBC,GAAqB;AAEzD,IAAIP,EAAQ,QAEVA,EAAQ,MAAM,KAAK,EAAE,MAAAM,GAAY,SAASC,GAAM,IAGhDR,EAAK,EAAE,MAAAO,GAAY,SAASC,EAAA,CAAM,GAGpCf,EAAQc,GAAMC,CAAI;AAAA,EACpB;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,GAAGb,EAAQ;AAAA,MAAA;AAAA,MAGZ,UAAA;AAAA,QAAAK,KAAgBE,KAAeD,KAC9B,gBAAAI;AAAA,UAACd,EAAW;AAAA,UAAX;AAAA,YACC,YAAAU;AAAA,YACA,aAAAC;AAAA,YACA,OAAOT,EAAE,oBAAoB,EAAE,YAAAQ,GAAY,aAAAC,GAAa;AAAA,YACxD,KAAKP,EAAQ,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAGxBA,EAAQ,QAAQ,+BAAcA,EAAQ,QAAQ,WAAhB,CAAA,CAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE7D;AAEJ;"}
|
|
@@ -8,6 +8,7 @@ export interface FlowContextInterface {
|
|
|
8
8
|
totalSteps?: number;
|
|
9
9
|
currentStep?: number | null;
|
|
10
10
|
defaultValues?: Record<string, unknown>;
|
|
11
|
+
progressBarCta?: React.ComponentType | null;
|
|
11
12
|
}
|
|
12
13
|
export declare const FlowContext: import('react').Context<FlowContextInterface | null>;
|
|
13
14
|
export declare function useFlow<C extends FlowContextInterface>(): C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFlow.js","sources":["../../../src/components/Flow/useFlow.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { OnEventType } from '../Base/useBase'\nimport type { CommonComponentInterface } from '../Base'\nimport type { EventType } from '@/shared/constants'\n\nexport interface FlowContextInterface {\n component: React.ComponentType<CommonComponentInterface> | null\n onEvent: OnEventType<EventType, unknown>\n showProgress?: boolean\n totalSteps?: number\n currentStep?: number | null\n defaultValues?: Record<string, unknown>\n}\n\nexport const FlowContext = createContext<FlowContextInterface | null>(null)\n\n//TODO: This is hiding the fact that the callsite for useFlow\n// destructures a `companyId` that doesn't seem to exist\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport function useFlow<C extends FlowContextInterface>() {\n // When used outside provider, this is expected to return undefined - consumers must fallback to params\n const values = useContext<C>(FlowContext as unknown as React.Context<C>)\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!values) {\n throw new Error('useFlow used outside provider')\n }\n return values\n}\n"],"names":["FlowContext","createContext","useFlow","values","useContext"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useFlow.js","sources":["../../../src/components/Flow/useFlow.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { OnEventType } from '../Base/useBase'\nimport type { CommonComponentInterface } from '../Base'\nimport type { EventType } from '@/shared/constants'\n\nexport interface FlowContextInterface {\n component: React.ComponentType<CommonComponentInterface> | null\n onEvent: OnEventType<EventType, unknown>\n showProgress?: boolean\n totalSteps?: number\n currentStep?: number | null\n defaultValues?: Record<string, unknown>\n progressBarCta?: React.ComponentType | null\n}\n\nexport const FlowContext = createContext<FlowContextInterface | null>(null)\n\n//TODO: This is hiding the fact that the callsite for useFlow\n// destructures a `companyId` that doesn't seem to exist\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport function useFlow<C extends FlowContextInterface>() {\n // When used outside provider, this is expected to return undefined - consumers must fallback to params\n const values = useContext<C>(FlowContext as unknown as React.Context<C>)\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!values) {\n throw new Error('useFlow used outside provider')\n }\n return values\n}\n"],"names":["FlowContext","createContext","useFlow","values","useContext"],"mappings":";AAeO,MAAMA,IAAcC,EAA2C,IAAI;AAKnE,SAASC,IAA0C;AAExD,QAAMC,IAASC,EAAcJ,CAA0C;AAEvE,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,+BAA+B;AAEjD,SAAOA;AACT;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseComponentInterface } from '../../Base/Base';
|
|
2
|
+
interface PayrollConfigurationProps extends BaseComponentInterface {
|
|
3
|
+
payrollId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const PayrollConfiguration: ({ onEvent, payrollId, ...baseProps }: PayrollConfigurationProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as s } from "react";
|
|
3
|
+
import { PayrollEditEmployee as d } from "../PayrollEditEmployee/PayrollEditEmployee.js";
|
|
4
|
+
import { PayrollConfigurationPresentation as E } from "./PayrollConfigurationPresentation.js";
|
|
5
|
+
import { BaseComponent as y } from "../../Base/Base.js";
|
|
6
|
+
import { componentEvents as e } from "../../../shared/constants.js";
|
|
7
|
+
const u = ({ payrollId: o }) => ({
|
|
8
|
+
data: {
|
|
9
|
+
employees: [{ employeeId: "cdef" }]
|
|
10
|
+
}
|
|
11
|
+
}), P = ({ payrollId: o }) => ({ mutate: async () => {
|
|
12
|
+
} }), D = ({
|
|
13
|
+
onEvent: o,
|
|
14
|
+
payrollId: n,
|
|
15
|
+
...i
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
data: { employees: m }
|
|
19
|
+
} = u({ payrollId: n }), { mutate: c } = P({ payrollId: n }), [r, l] = s(void 0);
|
|
20
|
+
return /* @__PURE__ */ a(y, { ...i, onEvent: o, children: r ? /* @__PURE__ */ a(d, { onEvent: (t, p) => {
|
|
21
|
+
t === e.RUN_PAYROLL_EMPLOYEE_SAVED && l(void 0), o(t, p);
|
|
22
|
+
}, employeeId: r }) : /* @__PURE__ */ a(
|
|
23
|
+
E,
|
|
24
|
+
{
|
|
25
|
+
employees: m,
|
|
26
|
+
onBack: () => {
|
|
27
|
+
o(e.RUN_PAYROLL_BACK);
|
|
28
|
+
},
|
|
29
|
+
onCalculatePayroll: async () => {
|
|
30
|
+
await c(), o(e.RUN_PAYROLL_CALCULATED);
|
|
31
|
+
},
|
|
32
|
+
onEdit: ({ employeeId: t }) => {
|
|
33
|
+
l(t), o(e.RUN_PAYROLL_EMPLOYEE_EDITED, { employeeId: t });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
D as PayrollConfiguration
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=PayrollConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayrollConfiguration.js","sources":["../../../../src/components/Payroll/PayrollConfiguration/PayrollConfiguration.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { PayrollEditEmployee } from '../PayrollEditEmployee/PayrollEditEmployee'\nimport { PayrollConfigurationPresentation } from './PayrollConfigurationPresentation'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport type { EventType } from '@/shared/constants'\nimport { componentEvents } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n//TODO: Use Speakeasy type\ninterface PayrollItem {\n payrollId: string\n}\n\n// TODO: Replace this hook with call to Speakeasy instead\nconst usePayrollApi = ({ payrollId }: PayrollItem) => {\n return {\n data: {\n employees: [{ employeeId: 'cdef' }],\n },\n }\n}\n// TODO: Replace this hook with call to Speakeasy instead\nconst useCalculatePayrollApi = ({ payrollId }: PayrollItem) => {\n const mutate = async () => {}\n return { mutate }\n}\n\ninterface PayrollConfigurationProps extends BaseComponentInterface {\n payrollId: string\n}\nexport const PayrollConfiguration = ({\n onEvent,\n payrollId,\n ...baseProps\n}: PayrollConfigurationProps) => {\n const {\n data: { employees },\n } = usePayrollApi({ payrollId })\n const { mutate } = useCalculatePayrollApi({ payrollId })\n const [editedEmployeeId, setEditedEmployeeId] = useState<string | undefined>(undefined)\n const onBack = () => {\n onEvent(componentEvents.RUN_PAYROLL_BACK)\n }\n const onCalculatePayroll = async () => {\n await mutate()\n onEvent(componentEvents.RUN_PAYROLL_CALCULATED)\n }\n const onEdit = ({ employeeId }: { employeeId: string }) => {\n setEditedEmployeeId(employeeId)\n onEvent(componentEvents.RUN_PAYROLL_EMPLOYEE_EDITED, { employeeId })\n }\n\n const wrappedOnEvent: OnEventType<string, unknown> = (event, payload) => {\n if (event === componentEvents.RUN_PAYROLL_EMPLOYEE_SAVED) {\n setEditedEmployeeId(undefined)\n }\n onEvent(event as EventType, payload)\n }\n\n const childComponent = editedEmployeeId ? (\n <PayrollEditEmployee onEvent={wrappedOnEvent} employeeId={editedEmployeeId} />\n ) : (\n <PayrollConfigurationPresentation\n employees={employees}\n onBack={onBack}\n onCalculatePayroll={onCalculatePayroll}\n onEdit={onEdit}\n />\n )\n\n return (\n <BaseComponent {...baseProps} onEvent={onEvent}>\n {childComponent}\n </BaseComponent>\n )\n}\n"],"names":["usePayrollApi","payrollId","useCalculatePayrollApi","PayrollConfiguration","onEvent","baseProps","employees","mutate","editedEmployeeId","setEditedEmployeeId","useState","jsx","BaseComponent","PayrollEditEmployee","event","payload","componentEvents","PayrollConfigurationPresentation","employeeId"],"mappings":";;;;;;AAeA,MAAMA,IAAgB,CAAC,EAAE,WAAAC,SAChB;AAAA,EACL,MAAM;AAAA,IACJ,WAAW,CAAC,EAAE,YAAY,QAAQ;AAAA,EAAA;AACpC,IAIEC,IAAyB,CAAC,EAAE,WAAAD,SAEzB,EAAE,QADM,YAAY;AAAC,EACnB,IAMEE,IAAuB,CAAC;AAAA,EACnC,SAAAC;AAAA,EACA,WAAAH;AAAA,EACA,GAAGI;AACL,MAAiC;AAC/B,QAAM;AAAA,IACJ,MAAM,EAAE,WAAAC,EAAA;AAAA,EAAU,IAChBN,EAAc,EAAE,WAAAC,GAAW,GACzB,EAAE,QAAAM,EAAA,IAAWL,EAAuB,EAAE,WAAAD,GAAW,GACjD,CAACO,GAAkBC,CAAmB,IAAIC,EAA6B,MAAS;AA+BtF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGP,GAAW,SAAAD,GAC3B,UAbkBI,IACrB,gBAAAG,EAACE,GAAA,EAAoB,SAR8B,CAACC,GAAOC,MAAY;AACvE,IAAID,MAAUE,EAAgB,8BAC5BP,EAAoB,MAAS,GAE/BL,EAAQU,GAAoBC,CAAO;AAAA,EACrC,GAGgD,YAAYP,GAAkB,IAE5E,gBAAAG;AAAA,IAACM;AAAA,IAAA;AAAA,MACC,WAAAX;AAAA,MACA,QAxBW,MAAM;AACnB,QAAAF,EAAQY,EAAgB,gBAAgB;AAAA,MAC1C;AAAA,MAuBI,oBAtBuB,YAAY;AACrC,cAAMT,EAAA,GACNH,EAAQY,EAAgB,sBAAsB;AAAA,MAChD;AAAA,MAoBI,QAnBW,CAAC,EAAE,YAAAE,QAAyC;AACzD,QAAAT,EAAoBS,CAAU,GAC9Bd,EAAQY,EAAgB,6BAA6B,EAAE,YAAAE,EAAA,CAAY;AAAA,MACrE;AAAA,IAgBI;AAAA,EAAA,GAOF;AAEJ;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Employee {
|
|
2
|
+
employeeId: string;
|
|
3
|
+
}
|
|
4
|
+
interface PayrollConfigurationPresentationProps {
|
|
5
|
+
employees: Employee[];
|
|
6
|
+
onBack: () => void;
|
|
7
|
+
onCalculatePayroll: () => void;
|
|
8
|
+
onEdit: (employee: Employee) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const PayrollConfigurationPresentation: ({ employees, onBack, onEdit, onCalculatePayroll, }: PayrollConfigurationPresentationProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
3
|
+
import { useComponentContext as h } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
|
+
import { HamburgerMenu as m } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
5
|
+
import p from "../../../assets/icons/pencil.svg.js";
|
|
6
|
+
import { DataView as y } from "../../Common/DataView/DataView.js";
|
|
7
|
+
const J = ({
|
|
8
|
+
employees: a,
|
|
9
|
+
onBack: d,
|
|
10
|
+
onEdit: c,
|
|
11
|
+
onCalculatePayroll: s
|
|
12
|
+
}) => {
|
|
13
|
+
const { Alert: n, Button: o, Heading: t, Text: l } = h();
|
|
14
|
+
return /* @__PURE__ */ i(r, { flexDirection: "column", children: [
|
|
15
|
+
/* @__PURE__ */ i(r, { justifyContent: "space-between", children: [
|
|
16
|
+
/* @__PURE__ */ e(t, { as: "h1", children: "Run payroll for Jul 5 - Jul 18, 2025" }),
|
|
17
|
+
/* @__PURE__ */ e(o, { title: "Calculate payroll", onClick: s, children: "Calculate payroll" })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ e(l, { children: "Regular payroll" }),
|
|
20
|
+
/* @__PURE__ */ i(r, { flexDirection: "column", alignItems: "stretch", children: [
|
|
21
|
+
/* @__PURE__ */ e(
|
|
22
|
+
n,
|
|
23
|
+
{
|
|
24
|
+
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",
|
|
25
|
+
status: "info",
|
|
26
|
+
children: "If you miss this deadline, your employees' direct deposit will be delayed."
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ e(n, { label: "2 employees will be skipped this payroll", status: "warning", children: /* @__PURE__ */ i("ul", { children: [
|
|
30
|
+
/* @__PURE__ */ e("li", { children: "John Smith - Employee address not verified" }),
|
|
31
|
+
/* @__PURE__ */ e("li", { children: "Jensen Cooper - Employee address not verified" })
|
|
32
|
+
] }) })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ e(t, { as: "h3", children: "Hours and additional earnings" }),
|
|
35
|
+
/* @__PURE__ */ e(l, { children: "Review and update..." }),
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
y,
|
|
38
|
+
{
|
|
39
|
+
label: "Configuration",
|
|
40
|
+
columns: [
|
|
41
|
+
{
|
|
42
|
+
title: "Employees",
|
|
43
|
+
render: () => /* @__PURE__ */ i(r, { flexDirection: "column", children: [
|
|
44
|
+
/* @__PURE__ */ e(l, { children: "John Smith" }),
|
|
45
|
+
/* @__PURE__ */ e(l, { children: "$22.00/hr" })
|
|
46
|
+
] })
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: "Hours",
|
|
50
|
+
render: () => /* @__PURE__ */ e(l, { children: "40" })
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
data: a,
|
|
54
|
+
itemMenu: ({ employeeId: u }) => /* @__PURE__ */ e(
|
|
55
|
+
m,
|
|
56
|
+
{
|
|
57
|
+
items: [
|
|
58
|
+
{
|
|
59
|
+
label: "Edit",
|
|
60
|
+
icon: /* @__PURE__ */ e(p, { "aria-hidden": !0 }),
|
|
61
|
+
onClick: () => {
|
|
62
|
+
c({ employeeId: u });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
triggerLabel: "Edit",
|
|
67
|
+
isLoading: !1
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ e(o, { title: "Back", onClick: d, children: "Back" })
|
|
73
|
+
] });
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
J as PayrollConfigurationPresentation
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=PayrollConfigurationPresentation.js.map
|
|
@@ -0,0 +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":";;;;;;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;"}
|