@gusto/embedded-react-sdk 0.20.0 → 0.22.0
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 +62 -0
- package/README.md +32 -17
- package/dist/UNSTABLE_Hooks.d.ts +1 -0
- package/dist/UNSTABLE_Hooks.js +9 -0
- package/dist/UNSTABLE_Hooks.js.map +1 -0
- package/dist/assets/icons/coins-hand.svg.js +10 -0
- package/dist/assets/icons/coins-hand.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-outline.svg.js +10 -0
- package/dist/assets/icons/icon-file-outline.svg.js.map +1 -0
- package/dist/assets/icons/icon-receipt-outline.svg.js +10 -0
- package/dist/assets/icons/icon-receipt-outline.svg.js.map +1 -0
- package/dist/components/Base/Base.d.ts +19 -4
- package/dist/components/Base/Base.js +67 -61
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -1
- package/dist/components/Base/useBase.d.ts +1 -1
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Base/useBaseSubmit.d.ts +10 -0
- package/dist/components/Base/useBaseSubmit.js +33 -0
- package/dist/components/Base/useBaseSubmit.js.map +1 -0
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.d.ts +5 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +34 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -0
- package/dist/components/Common/Fields/TextAreaField/index.d.ts +3 -0
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +10 -10
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +14 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -0
- package/dist/components/Common/FlowBreadcrumbs/index.d.ts +1 -0
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -2
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +8 -6
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -11
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +23 -22
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +4 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
- package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +38 -37
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +7 -7
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +4 -0
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -1
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +17 -17
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.d.ts +1 -1
- package/dist/components/Common/UI/Select/Select.js +27 -26
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.module.scss.js +6 -6
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +4 -0
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.d.ts +2 -0
- package/dist/components/Common/UI/TextArea/TextArea.js +79 -0
- package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -0
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +12 -0
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js.map +1 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +37 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js +9 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -0
- package/dist/components/Common/UI/TextArea/index.d.ts +4 -0
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -5
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +5 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +4 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +8 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +4 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +11 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +6 -4
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +10 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +10 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +10 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +4 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -7
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +9 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +4 -2
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +9 -7
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +7 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +10 -8
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +6 -4
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -8
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +16 -15
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -2
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- 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 +10 -9
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +8 -6
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +3 -2
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +11 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +8 -8
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +5 -3
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +11 -9
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +4 -4
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +5 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +7 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +48 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +14 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +109 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/Detail/DetailPresentation.d.ts +19 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.d.ts +7 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.js +34 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.js.map +1 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.d.ts +6 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js +84 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/Overview/Overview.d.ts +7 -0
- package/dist/components/Contractor/Payments/Overview/Overview.js +72 -0
- package/dist/components/Contractor/Payments/Overview/Overview.js.map +1 -0
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +18 -0
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js +131 -0
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js +26 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +15 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +30 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/index.d.ts +3 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +158 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +7 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +29 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +18 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +108 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +10 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js.map +1 -0
- package/dist/components/Contractor/Payments/types.d.ts +4 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +26 -26
- package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +20 -19
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/index.d.ts +1 -0
- package/dist/components/Contractor/index.js +4 -2
- package/dist/components/Contractor/index.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +14 -13
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -22
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +1 -1
- package/dist/components/Employee/Deductions/Deductions.js +10 -10
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +2 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js +6 -6
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +220 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +163 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +121 -125
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +56 -0
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +158 -0
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +55 -55
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +6 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +54 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.js +49 -29
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +4 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +4 -2
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +8 -6
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -2
- 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 +14 -14
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +9 -7
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +22 -7
- package/dist/components/Employee/FederalTaxes/FederalForm.js +85 -29
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +62 -46
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +3 -2
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +8 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -3
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -11
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +5 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +9 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -8
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +9 -8
- 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 +26 -23
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +10 -8
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +10 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.d.ts +22 -7
- package/dist/components/Employee/Taxes/FederalForm.js +85 -29
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +97 -81
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +14 -13
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +63 -34
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.module.scss.js +8 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +2 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +71 -54
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +23 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +27 -15
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +25 -2
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +152 -23
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js +10 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +9 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +194 -22
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +18 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +10 -2
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +44 -30
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +5 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +7 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +15 -15
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +32 -40
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -12
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +44 -52
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +9 -6
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +104 -101
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +58 -59
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +4 -6
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +77 -69
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +127 -103
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +254 -185
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +3 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +7 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js +19 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js +10 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +4 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +33 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +161 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +3 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js +17 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.test.d.ts +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +70 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +7 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +6 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +9 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +40 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +5 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +2 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +12 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +2 -0
- package/dist/components/Payroll/helpers.d.ts +0 -5
- package/dist/components/Payroll/helpers.js +106 -112
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +5 -6
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +7 -5
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +9 -0
- package/dist/helpers/dateFormatting.js +65 -52
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/I18n.js +3 -3
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +34 -0
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.EditPayment.json.js +36 -0
- package/dist/i18n/en/Contractor.Payments.EditPayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.Overview.json.js +34 -0
- package/dist/i18n/en/Contractor.Payments.Overview.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +34 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +24 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +1 -0
- package/dist/i18n/en/Employee.Deductions.json.js +58 -46
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +49 -41
- package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.Taxes.json.js +53 -45
- package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.Common.json.js +8 -0
- package/dist/i18n/en/Payroll.Common.json.js.map +1 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +25 -5
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollList.json.js +14 -16
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +34 -30
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.WireInstructions.json.js +22 -6
- package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
- package/dist/shared/constants.d.ts +18 -0
- package/dist/shared/constants.js +66 -55
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +236 -15
- package/package.json +19 -15
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +0 -7
- package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +0 -6
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +0 -15
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +0 -49
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +0 -1
package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { PayrollConfigurationProvider as c } from "./PayrollConfigurationProvider.js";
|
|
3
|
+
import { usePayrollConfiguration as s } from "./usePayrollConfiguration.js";
|
|
4
|
+
import { useDateFormatter as h } from "../../../../hooks/useDateFormatter.js";
|
|
5
|
+
import m from "../../../../hooks/useNumberFormatter.js";
|
|
6
|
+
import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
+
function u() {
|
|
8
|
+
const { payrollData: l } = s(), a = h(), n = m("currency"), { Heading: i, Text: t } = y(), e = l.payrollShow, d = a.formatWithTime(e?.payrollDeadline);
|
|
9
|
+
return /* @__PURE__ */ o("div", { children: [
|
|
10
|
+
/* @__PURE__ */ r(i, { as: "h1", children: "Payroll Configuration (Experimental)" }),
|
|
11
|
+
e && /* @__PURE__ */ o("div", { children: [
|
|
12
|
+
/* @__PURE__ */ r(i, { as: "h2", children: "Payroll Details" }),
|
|
13
|
+
/* @__PURE__ */ o(t, { children: [
|
|
14
|
+
/* @__PURE__ */ r("strong", { children: "Check Date:" }),
|
|
15
|
+
" ",
|
|
16
|
+
a.formatShortWithWeekday(e.checkDate)
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ o(t, { children: [
|
|
19
|
+
/* @__PURE__ */ r("strong", { children: "Pay Period:" }),
|
|
20
|
+
" ",
|
|
21
|
+
a.formatPayPeriodRange(
|
|
22
|
+
e.payPeriod?.startDate,
|
|
23
|
+
e.payPeriod?.endDate
|
|
24
|
+
)
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ o(t, { children: [
|
|
27
|
+
/* @__PURE__ */ r("strong", { children: "Payroll Deadline:" }),
|
|
28
|
+
" ",
|
|
29
|
+
d.date,
|
|
30
|
+
" at ",
|
|
31
|
+
d.time
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ o(t, { children: [
|
|
34
|
+
/* @__PURE__ */ r("strong", { children: "Calculated At:" }),
|
|
35
|
+
" ",
|
|
36
|
+
e.calculatedAt ? a.formatShortWithWeekday(e.calculatedAt) : "Not yet calculated"
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ o(t, { children: [
|
|
39
|
+
/* @__PURE__ */ r("strong", { children: "Off Cycle:" }),
|
|
40
|
+
" ",
|
|
41
|
+
e.offCycle ? "Yes" : "No"
|
|
42
|
+
] }),
|
|
43
|
+
e.totals && /* @__PURE__ */ o("div", { children: [
|
|
44
|
+
/* @__PURE__ */ r(i, { as: "h3", children: "Totals" }),
|
|
45
|
+
/* @__PURE__ */ o(t, { children: [
|
|
46
|
+
/* @__PURE__ */ r("strong", { children: "Net Pay Debit:" }),
|
|
47
|
+
" ",
|
|
48
|
+
n(Number(e.totals.netPayDebit ?? 0))
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ o(t, { children: [
|
|
51
|
+
/* @__PURE__ */ r("strong", { children: "Employee Taxes:" }),
|
|
52
|
+
" ",
|
|
53
|
+
n(Number(e.totals.employeeTaxes ?? 0))
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ o(t, { children: [
|
|
56
|
+
/* @__PURE__ */ r("strong", { children: "Employer Taxes:" }),
|
|
57
|
+
" ",
|
|
58
|
+
n(Number(e.totals.employerTaxes ?? 0))
|
|
59
|
+
] })
|
|
60
|
+
] })
|
|
61
|
+
] })
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
function x({ companyId: l, payrollId: a }) {
|
|
65
|
+
return /* @__PURE__ */ r(c, { companyId: l, payrollId: a, children: /* @__PURE__ */ r(u, {}) });
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
x as PayrollConfiguration
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=PayrollConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayrollConfiguration.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.tsx"],"sourcesContent":["import { PayrollConfigurationProvider } from './PayrollConfigurationProvider'\nimport { usePayrollConfiguration } from './usePayrollConfiguration'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface PayrollConfigurationProps {\n companyId: string\n payrollId: string\n}\n\nfunction PayrollConfiguration() {\n const { payrollData } = usePayrollConfiguration()\n const dateFormatter = useDateFormatter()\n const formatCurrency = useNumberFormatter('currency')\n const { Heading, Text } = useComponentContext()\n\n const payroll = payrollData.payrollShow\n\n const payrollDeadline = dateFormatter.formatWithTime(payroll?.payrollDeadline)\n\n return (\n <div>\n <Heading as=\"h1\">Payroll Configuration (Experimental)</Heading>\n {payroll && (\n <div>\n <Heading as=\"h2\">Payroll Details</Heading>\n <Text>\n <strong>Check Date:</strong> {dateFormatter.formatShortWithWeekday(payroll.checkDate)}\n </Text>\n <Text>\n <strong>Pay Period:</strong>{' '}\n {dateFormatter.formatPayPeriodRange(\n payroll.payPeriod?.startDate,\n payroll.payPeriod?.endDate,\n )}\n </Text>\n <Text>\n <strong>Payroll Deadline:</strong> {payrollDeadline.date} at {payrollDeadline.time}\n </Text>\n <Text>\n <strong>Calculated At:</strong>{' '}\n {payroll.calculatedAt\n ? dateFormatter.formatShortWithWeekday(payroll.calculatedAt)\n : 'Not yet calculated'}\n </Text>\n <Text>\n <strong>Off Cycle:</strong> {payroll.offCycle ? 'Yes' : 'No'}\n </Text>\n {payroll.totals && (\n <div>\n <Heading as=\"h3\">Totals</Heading>\n <Text>\n <strong>Net Pay Debit:</strong>{' '}\n {formatCurrency(Number(payroll.totals.netPayDebit ?? 0))}\n </Text>\n <Text>\n <strong>Employee Taxes:</strong>{' '}\n {formatCurrency(Number(payroll.totals.employeeTaxes ?? 0))}\n </Text>\n <Text>\n <strong>Employer Taxes:</strong>{' '}\n {formatCurrency(Number(payroll.totals.employerTaxes ?? 0))}\n </Text>\n </div>\n )}\n </div>\n )}\n </div>\n )\n}\n\nfunction ComposedPayrollConfiguration({ companyId, payrollId }: PayrollConfigurationProps) {\n return (\n <PayrollConfigurationProvider companyId={companyId} payrollId={payrollId}>\n <PayrollConfiguration />\n </PayrollConfigurationProvider>\n )\n}\n\nexport { ComposedPayrollConfiguration as PayrollConfiguration }\n"],"names":["PayrollConfiguration","payrollData","usePayrollConfiguration","dateFormatter","useDateFormatter","formatCurrency","useNumberFormatter","Heading","Text","useComponentContext","payroll","payrollDeadline","jsx","jsxs","ComposedPayrollConfiguration","companyId","payrollId","PayrollConfigurationProvider"],"mappings":";;;;;;AAWA,SAASA,IAAuB;AAC9B,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAClBC,IAAgBC,EAAA,GAChBC,IAAiBC,EAAmB,UAAU,GAC9C,EAAE,SAAAC,GAAS,MAAAC,EAAA,IAASC,EAAA,GAEpBC,IAAUT,EAAY,aAEtBU,IAAkBR,EAAc,eAAeO,GAAS,eAAe;AAE7E,2BACG,OAAA,EACC,UAAA;AAAA,IAAA,gBAAAE,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,wCAAoC;AAAA,IACpDG,uBACE,OAAA,EACC,UAAA;AAAA,MAAA,gBAAAE,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,mBAAe;AAAA,wBAC/BC,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,cAAA,CAAW;AAAA,QAAS;AAAA,QAAET,EAAc,uBAAuBO,EAAQ,SAAS;AAAA,MAAA,GACtF;AAAA,wBACCF,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,cAAA,CAAW;AAAA,QAAU;AAAA,QAC5BT,EAAc;AAAA,UACbO,EAAQ,WAAW;AAAA,UACnBA,EAAQ,WAAW;AAAA,QAAA;AAAA,MACrB,GACF;AAAA,wBACCF,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,oBAAA,CAAiB;AAAA,QAAS;AAAA,QAAED,EAAgB;AAAA,QAAK;AAAA,QAAKA,EAAgB;AAAA,MAAA,GAChF;AAAA,wBACCH,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,iBAAA,CAAc;AAAA,QAAU;AAAA,QAC/BF,EAAQ,eACLP,EAAc,uBAAuBO,EAAQ,YAAY,IACzD;AAAA,MAAA,GACN;AAAA,wBACCF,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,aAAA,CAAU;AAAA,QAAS;AAAA,QAAEF,EAAQ,WAAW,QAAQ;AAAA,MAAA,GAC1D;AAAA,MACCA,EAAQ,UACP,gBAAAG,EAAC,OAAA,EACC,UAAA;AAAA,QAAA,gBAAAD,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,UAAM;AAAA,0BACtBC,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAI,EAAC,YAAO,UAAA,iBAAA,CAAc;AAAA,UAAU;AAAA,UAC/BP,EAAe,OAAOK,EAAQ,OAAO,eAAe,CAAC,CAAC;AAAA,QAAA,GACzD;AAAA,0BACCF,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAI,EAAC,YAAO,UAAA,kBAAA,CAAe;AAAA,UAAU;AAAA,UAChCP,EAAe,OAAOK,EAAQ,OAAO,iBAAiB,CAAC,CAAC;AAAA,QAAA,GAC3D;AAAA,0BACCF,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAI,EAAC,YAAO,UAAA,kBAAA,CAAe;AAAA,UAAU;AAAA,UAChCP,EAAe,OAAOK,EAAQ,OAAO,iBAAiB,CAAC,CAAC;AAAA,QAAA,EAAA,CAC3D;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;AAEA,SAASI,EAA6B,EAAE,WAAAC,GAAW,WAAAC,KAAwC;AACzF,2BACGC,GAAA,EAA6B,WAAAF,GAAsB,WAAAC,GAClD,UAAA,gBAAAJ,EAACZ,KAAqB,GACxB;AAEJ;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PayrollShow } from '@gusto/embedded-api/models/components/payrollshow';
|
|
2
|
+
export interface PayrollConfigurationContextValue {
|
|
3
|
+
payrollData: {
|
|
4
|
+
payrollShow?: PayrollShow | null;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare const PayrollConfigurationContext: import('react').Context<PayrollConfigurationContextValue | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayrollConfigurationContext.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { PayrollShow } from '@gusto/embedded-api/models/components/payrollshow'\n\nexport interface PayrollConfigurationContextValue {\n payrollData: {\n payrollShow?: PayrollShow | null\n }\n}\n\nexport const PayrollConfigurationContext = createContext<\n PayrollConfigurationContextValue | undefined\n>(undefined)\n"],"names":["PayrollConfigurationContext","createContext"],"mappings":";AASO,MAAMA,IAA8BC,EAEzC,MAAS;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BaseBoundariesProps } from '../../../Base/Base';
|
|
3
|
+
export interface PayrollConfigurationProviderProps extends BaseBoundariesProps {
|
|
4
|
+
companyId: string;
|
|
5
|
+
payrollId: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function ComposedPayrollConfigurationProvider({ companyId, payrollId, children, FallbackComponent, LoaderComponent, onErrorBoundaryError, }: PayrollConfigurationProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { ComposedPayrollConfigurationProvider as PayrollConfigurationProvider };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { usePayrollsGetSuspense as l } from "@gusto/embedded-api/react-query/payrollsGet";
|
|
3
|
+
import { PayrollConfigurationContext as u } from "./PayrollConfigurationContext.js";
|
|
4
|
+
import { BaseBoundaries as s } from "../../../Base/Base.js";
|
|
5
|
+
function d({
|
|
6
|
+
companyId: o,
|
|
7
|
+
payrollId: r,
|
|
8
|
+
children: t
|
|
9
|
+
}) {
|
|
10
|
+
const { data: e } = l({
|
|
11
|
+
companyId: o,
|
|
12
|
+
payrollId: r,
|
|
13
|
+
include: ["taxes", "benefits", "deductions"]
|
|
14
|
+
}), n = {
|
|
15
|
+
payrollData: e
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ i(u.Provider, { value: n, children: t });
|
|
18
|
+
}
|
|
19
|
+
function p({
|
|
20
|
+
companyId: o,
|
|
21
|
+
payrollId: r,
|
|
22
|
+
children: t,
|
|
23
|
+
FallbackComponent: e,
|
|
24
|
+
LoaderComponent: n,
|
|
25
|
+
onErrorBoundaryError: a
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ i(
|
|
28
|
+
s,
|
|
29
|
+
{
|
|
30
|
+
FallbackComponent: e,
|
|
31
|
+
LoaderComponent: n,
|
|
32
|
+
onErrorBoundaryError: a,
|
|
33
|
+
children: /* @__PURE__ */ i(d, { companyId: o, payrollId: r, children: t })
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
p as PayrollConfigurationProvider
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=PayrollConfigurationProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayrollConfigurationProvider.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport {\n PayrollConfigurationContext,\n type PayrollConfigurationContextValue,\n} from './PayrollConfigurationContext'\nimport { BaseBoundaries, type BaseBoundariesProps } from '@/components/Base/Base'\n\nexport interface PayrollConfigurationProviderProps extends BaseBoundariesProps {\n companyId: string\n payrollId: string\n children: ReactNode\n}\n\nfunction PayrollConfigurationProvider({\n companyId,\n payrollId,\n children,\n}: PayrollConfigurationProviderProps) {\n const { data: payrollData } = usePayrollsGetSuspense({\n companyId,\n payrollId,\n include: ['taxes', 'benefits', 'deductions'],\n })\n\n const contextValue: PayrollConfigurationContextValue = {\n payrollData,\n }\n\n return (\n <PayrollConfigurationContext.Provider value={contextValue}>\n {children}\n </PayrollConfigurationContext.Provider>\n )\n}\n\nfunction ComposedPayrollConfigurationProvider({\n companyId,\n payrollId,\n children,\n FallbackComponent,\n LoaderComponent,\n onErrorBoundaryError,\n}: PayrollConfigurationProviderProps) {\n return (\n <BaseBoundaries\n FallbackComponent={FallbackComponent}\n LoaderComponent={LoaderComponent}\n onErrorBoundaryError={onErrorBoundaryError}\n >\n <PayrollConfigurationProvider companyId={companyId} payrollId={payrollId}>\n {children}\n </PayrollConfigurationProvider>\n </BaseBoundaries>\n )\n}\n\nexport { ComposedPayrollConfigurationProvider as PayrollConfigurationProvider }\n"],"names":["PayrollConfigurationProvider","companyId","payrollId","children","payrollData","usePayrollsGetSuspense","contextValue","PayrollConfigurationContext","ComposedPayrollConfigurationProvider","FallbackComponent","LoaderComponent","onErrorBoundaryError","jsx","BaseBoundaries"],"mappings":";;;;AAcA,SAASA,EAA6B;AAAA,EACpC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAAsC;AACpC,QAAM,EAAE,MAAMC,EAAA,IAAgBC,EAAuB;AAAA,IACnD,WAAAJ;AAAA,IACA,WAAAC;AAAA,IACA,SAAS,CAAC,SAAS,YAAY,YAAY;AAAA,EAAA,CAC5C,GAEKI,IAAiD;AAAA,IACrD,aAAAF;AAAA,EAAA;AAGF,2BACGG,EAA4B,UAA5B,EAAqC,OAAOD,GAC1C,UAAAH,GACH;AAEJ;AAEA,SAASK,EAAqC;AAAA,EAC5C,WAAAP;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,mBAAAM;AAAA,EACA,iBAAAC;AAAA,EACA,sBAAAC;AACF,GAAsC;AACpC,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,mBAAAJ;AAAA,MACA,iBAAAC;AAAA,MACA,sBAAAC;AAAA,MAEA,UAAA,gBAAAC,EAACZ,GAAA,EAA6B,WAAAC,GAAsB,WAAAC,GACjD,UAAAC,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export { PayrollConfiguration } from './PayrollConfiguration';
|
|
3
|
+
export { PayrollConfigurationProvider } from './PayrollConfigurationProvider';
|
|
4
|
+
export { usePayrollConfiguration } from './usePayrollConfiguration';
|
|
5
|
+
export type { PayrollConfigurationContextValue } from './PayrollConfigurationContext';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useContext as r } from "react";
|
|
2
|
+
import { PayrollConfigurationContext as t } from "./PayrollConfigurationContext.js";
|
|
3
|
+
function e() {
|
|
4
|
+
const o = r(t);
|
|
5
|
+
if (o === void 0)
|
|
6
|
+
throw new Error("usePayrollConfiguration must be used within a PayrollConfigurationProvider");
|
|
7
|
+
return o;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
e as usePayrollConfiguration
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=usePayrollConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePayrollConfiguration.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.ts"],"sourcesContent":["import { useContext } from 'react'\nimport {\n PayrollConfigurationContext,\n type PayrollConfigurationContextValue,\n} from './PayrollConfigurationContext'\n\nexport function usePayrollConfiguration(): PayrollConfigurationContextValue {\n const context = useContext(PayrollConfigurationContext)\n if (context === undefined) {\n throw new Error('usePayrollConfiguration must be used within a PayrollConfigurationProvider')\n }\n return context\n}\n"],"names":["usePayrollConfiguration","context","useContext","PayrollConfigurationContext"],"mappings":";;AAMO,SAASA,IAA4D;AAC1E,QAAMC,IAAUC,EAAWC,CAA2B;AACtD,MAAIF,MAAY;AACd,UAAM,IAAI,MAAM,4EAA4E;AAE9F,SAAOA;AACT;"}
|
|
@@ -5,7 +5,6 @@ import { TFunction } from 'i18next';
|
|
|
5
5
|
import { PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleobject';
|
|
6
6
|
import { Payroll } from '@gusto/embedded-api/models/components/payroll';
|
|
7
7
|
import { PayrollType } from './PayrollList/types';
|
|
8
|
-
import { PayrollHistoryStatus } from './PayrollHistory/PayrollHistory';
|
|
9
8
|
export declare const getPrimaryJob: (employee: Employee) => import('@gusto/embedded-api/models/components/job.js').Job | null;
|
|
10
9
|
export declare const formatEmployeePayRate: ({ employee, t, locale, }: {
|
|
11
10
|
employee?: Employee;
|
|
@@ -28,10 +27,6 @@ export declare const getPayrollType: (payroll: {
|
|
|
28
27
|
external?: boolean;
|
|
29
28
|
offCycle?: boolean;
|
|
30
29
|
}) => PayrollType;
|
|
31
|
-
export declare const getPayrollStatus: (payroll: {
|
|
32
|
-
processed?: boolean;
|
|
33
|
-
checkDate?: string | null;
|
|
34
|
-
}) => PayrollHistoryStatus;
|
|
35
30
|
export declare const getAdditionalEarningsCompensations: ({ flsaStatus, existingFixedCompensations, primaryJobUuid, fixedCompensationTypes, excludedTypes, }: {
|
|
36
31
|
flsaStatus: string | undefined;
|
|
37
32
|
existingFixedCompensations?: FixedCompensations[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { useCallback as F } from "react";
|
|
2
|
+
import { useTranslation as D } from "react-i18next";
|
|
3
3
|
import { formatPayRate as E } from "../../helpers/formattedStrings.js";
|
|
4
4
|
import { useLocale as v } from "../../contexts/LocaleProvider/useLocale.js";
|
|
5
5
|
import { FlsaStatus as M, COMPENSATION_NAME_REIMBURSEMENT as g } from "../../shared/constants.js";
|
|
6
|
-
const x = "regular hours", y = (
|
|
6
|
+
const x = "regular hours", y = (t) => t.jobs?.find((e) => e.primary) || t.jobs?.[0] || null, S = (t) => Math.round(t * 1e6) / 1e6, C = (t) => Math.round(t * 100) / 100, H = (t) => t.toLowerCase() === x, j = {
|
|
7
7
|
Daily: 8,
|
|
8
8
|
"Every week": 40,
|
|
9
9
|
"Every other week": 80,
|
|
@@ -13,154 +13,154 @@ const x = "regular hours", y = (e) => e.jobs?.find((t) => t.primary) || e.jobs?.
|
|
|
13
13
|
Semiannually: 1040,
|
|
14
14
|
Annually: 2080
|
|
15
15
|
}, N = ({
|
|
16
|
-
employee:
|
|
17
|
-
t,
|
|
16
|
+
employee: t,
|
|
17
|
+
t: e,
|
|
18
18
|
locale: r = "en-US"
|
|
19
19
|
}) => {
|
|
20
|
-
if (!
|
|
20
|
+
if (!t?.jobs)
|
|
21
21
|
return null;
|
|
22
|
-
const n = y(
|
|
22
|
+
const n = y(t);
|
|
23
23
|
if (!n?.compensations)
|
|
24
24
|
return null;
|
|
25
25
|
const o = n.compensations[0];
|
|
26
26
|
if (!o || !o.rate || parseFloat(o.rate) === 0)
|
|
27
27
|
return null;
|
|
28
28
|
const s = parseFloat(o.rate), u = o.paymentUnit || "Hour";
|
|
29
|
-
return E({ rate: s, paymentUnit: u, t, locale: r });
|
|
29
|
+
return E({ rate: s, paymentUnit: u, t: e, locale: r });
|
|
30
30
|
}, V = () => {
|
|
31
|
-
const { t
|
|
32
|
-
return
|
|
33
|
-
(r) => N({ employee: r, t
|
|
34
|
-
[
|
|
31
|
+
const { t } = D("common"), { locale: e } = v();
|
|
32
|
+
return F(
|
|
33
|
+
(r) => N({ employee: r, t, locale: e }),
|
|
34
|
+
[t, e]
|
|
35
35
|
);
|
|
36
|
-
}, X = (
|
|
37
|
-
function Z(
|
|
38
|
-
return !
|
|
36
|
+
}, X = (t) => t.hourlyCompensations ? t.hourlyCompensations.filter((e) => e.name?.toLowerCase() === "regular hours").reduce((e, r) => e + parseFloat(r.hours || "0"), 0) : 0;
|
|
37
|
+
function Z(t) {
|
|
38
|
+
return !t.hourlyCompensations || t.excluded ? 0 : t.hourlyCompensations.filter((e) => Number(e.compensationMultiplier) > 1).reduce((e, r) => e + parseFloat(r.hours || "0"), 0);
|
|
39
39
|
}
|
|
40
|
-
const L = (
|
|
41
|
-
const r =
|
|
40
|
+
const L = (t) => t.paidTimeOff ? t.paidTimeOff.reduce((e, r) => e + parseFloat(r.hours || "0"), 0) : 0, O = (t) => t.fixedCompensations ? t.fixedCompensations.filter((e) => {
|
|
41
|
+
const r = e.name?.toLowerCase() || "", n = parseFloat(e.amount || "0");
|
|
42
42
|
return r !== "reimbursement" && r !== "minimum wage adjustment" && n > 0;
|
|
43
|
-
}).reduce((
|
|
44
|
-
if (!
|
|
43
|
+
}).reduce((e, r) => e + parseFloat(r.amount || "0"), 0) : 0, tt = (t) => {
|
|
44
|
+
if (!t.fixedCompensations)
|
|
45
45
|
return 0;
|
|
46
|
-
const
|
|
46
|
+
const e = t.fixedCompensations.find(
|
|
47
47
|
(r) => r.name?.toLowerCase() === "reimbursement"
|
|
48
48
|
);
|
|
49
|
-
return
|
|
50
|
-
},
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
}, U = (
|
|
54
|
-
if (!
|
|
55
|
-
const r = [...
|
|
49
|
+
return e ? parseFloat(e.amount || "0") : 0;
|
|
50
|
+
}, et = (t) => {
|
|
51
|
+
const e = C(t);
|
|
52
|
+
return e % 1 === 0 ? `${e}.0` : e.toString();
|
|
53
|
+
}, U = (t) => t.frequency && j[t.frequency] || 0, h = (t, e) => {
|
|
54
|
+
if (!t.length) return null;
|
|
55
|
+
const r = [...t].sort(
|
|
56
56
|
(n, o) => (n.effectiveDate ? new Date(n.effectiveDate).getTime() : 0) - (o.effectiveDate ? new Date(o.effectiveDate).getTime() : 0)
|
|
57
57
|
);
|
|
58
58
|
for (let n = r.length - 1; n >= 0; n--) {
|
|
59
59
|
const o = r[n]?.effectiveDate, s = o ? new Date(o) : null;
|
|
60
|
-
if (s && s <=
|
|
60
|
+
if (s && s <= e)
|
|
61
61
|
return r[n] || null;
|
|
62
62
|
}
|
|
63
63
|
return r[0] || null;
|
|
64
|
-
},
|
|
65
|
-
if (!
|
|
66
|
-
const r = [...
|
|
64
|
+
}, A = (t, e) => {
|
|
65
|
+
if (!t.length) return null;
|
|
66
|
+
const r = [...t].sort(
|
|
67
67
|
(n, o) => (n.effectiveDate ? new Date(n.effectiveDate).getTime() : 0) - (o.effectiveDate ? new Date(o.effectiveDate).getTime() : 0)
|
|
68
68
|
);
|
|
69
69
|
for (let n = r.length - 1; n >= 0; n--) {
|
|
70
70
|
const o = r[n]?.effectiveDate, s = o ? new Date(o) : null;
|
|
71
|
-
if (s && s <=
|
|
71
|
+
if (s && s <= e)
|
|
72
72
|
return r[n] || null;
|
|
73
73
|
}
|
|
74
74
|
return r[0] || null;
|
|
75
|
-
},
|
|
76
|
-
const r =
|
|
75
|
+
}, W = (t) => t.flsaStatus === "Exempt" || t.flsaStatus === "Salaried Nonexempt", I = (t) => t.length ? t.filter((e) => {
|
|
76
|
+
const r = e.name?.toLowerCase(), n = parseFloat(e.amount || "0");
|
|
77
77
|
return (r === "paycheck tips" || r === "cash tips") && n > 0;
|
|
78
|
-
}).reduce((
|
|
79
|
-
const
|
|
80
|
-
switch (
|
|
78
|
+
}).reduce((e, r) => e + parseFloat(r.amount || "0"), 0) : 0, P = (t) => {
|
|
79
|
+
const e = parseFloat(t.rate || "0");
|
|
80
|
+
switch (t.paymentUnit || "Hour") {
|
|
81
81
|
case "Hour":
|
|
82
|
-
return
|
|
82
|
+
return e;
|
|
83
83
|
case "Year":
|
|
84
|
-
return
|
|
84
|
+
return e / 2080;
|
|
85
85
|
// 52 weeks * 40 hours
|
|
86
86
|
case "Month":
|
|
87
|
-
return
|
|
87
|
+
return e / 173.333333;
|
|
88
88
|
case "Week":
|
|
89
|
-
return
|
|
89
|
+
return e / 40;
|
|
90
90
|
case "Paycheck":
|
|
91
91
|
return 0;
|
|
92
92
|
// Paycheck rate is 0 for hourly calculation
|
|
93
93
|
default:
|
|
94
|
-
return
|
|
94
|
+
return e;
|
|
95
95
|
}
|
|
96
|
-
},
|
|
97
|
-
const n =
|
|
96
|
+
}, _ = (t, e, r) => {
|
|
97
|
+
const n = t.jobs?.find((s) => s.uuid === e);
|
|
98
98
|
if (!n?.compensations)
|
|
99
99
|
return 0;
|
|
100
100
|
const o = h(n.compensations, r);
|
|
101
101
|
return o ? P(o) : 0;
|
|
102
|
-
},
|
|
103
|
-
const r = y(
|
|
102
|
+
}, R = (t, e) => {
|
|
103
|
+
const r = y(t);
|
|
104
104
|
if (!r?.compensations)
|
|
105
105
|
return 0;
|
|
106
|
-
const n = h(r.compensations,
|
|
106
|
+
const n = h(r.compensations, e);
|
|
107
107
|
return n ? P(n) : 0;
|
|
108
|
-
},
|
|
109
|
-
(
|
|
108
|
+
}, k = (t) => t.paidTimeOff ? t.paidTimeOff.reduce(
|
|
109
|
+
(e, r) => e + parseFloat(r.finalPayoutUnusedHoursInput || "0"),
|
|
110
110
|
0
|
|
111
|
-
) : 0,
|
|
112
|
-
const o = L(
|
|
111
|
+
) : 0, w = (t, e, r, n) => {
|
|
112
|
+
const o = L(t);
|
|
113
113
|
if (n) {
|
|
114
|
-
const s =
|
|
114
|
+
const s = k(t);
|
|
115
115
|
return o + s;
|
|
116
116
|
}
|
|
117
|
-
return
|
|
118
|
-
}, G = (
|
|
119
|
-
if (!
|
|
120
|
-
const n =
|
|
121
|
-
|
|
117
|
+
return e ? Math.min(r, o) : o;
|
|
118
|
+
}, G = (t, e, r) => {
|
|
119
|
+
if (!t.adjustForMinimumWage) return 0;
|
|
120
|
+
const n = A(
|
|
121
|
+
t.minimumWages || [],
|
|
122
122
|
r
|
|
123
123
|
);
|
|
124
124
|
if (!n)
|
|
125
125
|
return 0;
|
|
126
|
-
const o =
|
|
126
|
+
const o = e.hourlyCompensations?.reduce(
|
|
127
127
|
(m, i) => m + parseFloat(i.hours || "0"),
|
|
128
128
|
0
|
|
129
|
-
) || 0, s = P(
|
|
129
|
+
) || 0, s = P(t), u = (parseFloat(n.wage || "0") - s) * o, a = I(e.fixedCompensations || []);
|
|
130
130
|
return Math.max(0, u - a);
|
|
131
|
-
}, J = (
|
|
131
|
+
}, J = (t, e, r, n, o, s, u) => {
|
|
132
132
|
if (!u && n)
|
|
133
|
-
return
|
|
134
|
-
if (!
|
|
133
|
+
return R(e, r) * (o - s);
|
|
134
|
+
if (!t.hourlyCompensations || !e.jobs)
|
|
135
135
|
return 0;
|
|
136
|
-
const a =
|
|
137
|
-
const
|
|
138
|
-
return l +
|
|
139
|
-
}, 0), m =
|
|
136
|
+
const a = t.hourlyCompensations.reduce((l, c) => {
|
|
137
|
+
const p = parseFloat(c.hours || "0"), d = _(e, c.jobUuid || "", r);
|
|
138
|
+
return l + p * d;
|
|
139
|
+
}, 0), m = t.hourlyCompensations.reduce((l, c) => l + parseFloat(c.hours || "0"), 0);
|
|
140
140
|
if (m === 0) return a;
|
|
141
|
-
const i = S(a / m), f =
|
|
142
|
-
const
|
|
143
|
-
return l +
|
|
141
|
+
const i = S(a / m), f = t.hourlyCompensations.filter((l) => !H(l.name || "")).reduce((l, c) => {
|
|
142
|
+
const p = parseFloat(c.hours || "0"), d = c.compensationMultiplier || 1;
|
|
143
|
+
return l + p * i * (d - 1);
|
|
144
144
|
}, 0);
|
|
145
145
|
return a + f;
|
|
146
|
-
}, q = (
|
|
147
|
-
const u =
|
|
148
|
-
|
|
146
|
+
}, q = (t, e, r, n, o, s) => {
|
|
147
|
+
const u = w(
|
|
148
|
+
t,
|
|
149
149
|
n,
|
|
150
150
|
o,
|
|
151
151
|
s
|
|
152
|
-
), a =
|
|
152
|
+
), a = R(e, r);
|
|
153
153
|
return u * a;
|
|
154
|
-
}, B = (
|
|
155
|
-
if (!
|
|
156
|
-
const n =
|
|
154
|
+
}, B = (t, e, r) => {
|
|
155
|
+
if (!e) return !1;
|
|
156
|
+
const n = t.hourlyCompensations?.find(
|
|
157
157
|
(s) => H(s.name || "")
|
|
158
158
|
);
|
|
159
159
|
return n ? parseFloat(n.hours || "0") === r : !1;
|
|
160
|
-
},
|
|
161
|
-
if (
|
|
160
|
+
}, rt = (t, e, r, n, o = !1) => {
|
|
161
|
+
if (t.excluded)
|
|
162
162
|
return 0;
|
|
163
|
-
const s = r ? new Date(r) : /* @__PURE__ */ new Date(), u = y(
|
|
163
|
+
const s = r ? new Date(r) : /* @__PURE__ */ new Date(), u = y(e);
|
|
164
164
|
if (!u?.compensations)
|
|
165
165
|
return 0;
|
|
166
166
|
const a = h(
|
|
@@ -169,50 +169,45 @@ const L = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
|
|
|
169
169
|
);
|
|
170
170
|
if (!a)
|
|
171
171
|
return 0;
|
|
172
|
-
const m =
|
|
173
|
-
|
|
172
|
+
const m = W(a), i = n ? U(n) : 0, f = B(
|
|
173
|
+
t,
|
|
174
174
|
m,
|
|
175
175
|
i
|
|
176
|
-
), l =
|
|
177
|
-
|
|
176
|
+
), l = w(
|
|
177
|
+
t,
|
|
178
178
|
f,
|
|
179
179
|
i,
|
|
180
180
|
o
|
|
181
181
|
), c = J(
|
|
182
|
-
e,
|
|
183
182
|
t,
|
|
183
|
+
e,
|
|
184
184
|
s,
|
|
185
185
|
f,
|
|
186
186
|
i,
|
|
187
187
|
l,
|
|
188
188
|
o
|
|
189
|
-
),
|
|
190
|
-
e,
|
|
189
|
+
), p = O(t), d = q(
|
|
191
190
|
t,
|
|
191
|
+
e,
|
|
192
192
|
s,
|
|
193
193
|
f,
|
|
194
194
|
i,
|
|
195
195
|
o
|
|
196
|
-
),
|
|
196
|
+
), b = G(
|
|
197
197
|
a,
|
|
198
|
-
|
|
198
|
+
t,
|
|
199
199
|
s
|
|
200
|
-
),
|
|
201
|
-
return C(
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
const t = /* @__PURE__ */ new Date(), r = e.checkDate ? new Date(e.checkDate) : null;
|
|
206
|
-
return r && r <= t ? "Paid" : "Pending";
|
|
207
|
-
}, se = ({
|
|
208
|
-
flsaStatus: e,
|
|
209
|
-
existingFixedCompensations: t = [],
|
|
200
|
+
), T = c + p + d + b;
|
|
201
|
+
return C(T);
|
|
202
|
+
}, nt = (t) => t.external ? "External" : t.offCycle ? "Off-Cycle" : "Regular", ot = ({
|
|
203
|
+
flsaStatus: t,
|
|
204
|
+
existingFixedCompensations: e = [],
|
|
210
205
|
primaryJobUuid: r,
|
|
211
206
|
fixedCompensationTypes: n = [],
|
|
212
207
|
excludedTypes: o = []
|
|
213
208
|
}) => {
|
|
214
|
-
const s = [...
|
|
215
|
-
return
|
|
209
|
+
const s = [...e];
|
|
210
|
+
return t !== M.OWNER && r && n.length > 0 && n.map((a) => a.name).filter(Boolean).forEach((a) => {
|
|
216
211
|
s.some(
|
|
217
212
|
(i) => i.name?.toLowerCase() === a.toLowerCase()
|
|
218
213
|
) || s.push({
|
|
@@ -221,32 +216,31 @@ const L = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
|
|
|
221
216
|
jobUuid: r
|
|
222
217
|
});
|
|
223
218
|
}), s.filter((u) => u.name && !o.includes(u.name)).sort((u, a) => (u.name || "").localeCompare(a.name || ""));
|
|
224
|
-
},
|
|
225
|
-
const n =
|
|
219
|
+
}, st = (t, e, r) => {
|
|
220
|
+
const n = t.find(
|
|
226
221
|
(o) => o.name?.toLowerCase() === g.toLowerCase()
|
|
227
222
|
);
|
|
228
|
-
return n || (r &&
|
|
223
|
+
return n || (r && e.some(
|
|
229
224
|
(o) => o.name?.toLowerCase() === g.toLowerCase()
|
|
230
225
|
) ? {
|
|
231
226
|
name: g,
|
|
232
227
|
amount: "0.00",
|
|
233
228
|
jobUuid: r
|
|
234
229
|
} : null);
|
|
235
|
-
},
|
|
230
|
+
}, at = (t) => t.totals ? Number(t.totals.grossPay ?? 0) + Number(t.totals.employerTaxes ?? 0) + Number(t.totals.reimbursements ?? 0) + Number(t.totals.benefits ?? 0) : 0;
|
|
236
231
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
232
|
+
rt as calculateGrossPay,
|
|
233
|
+
at as calculateTotalPayroll,
|
|
239
234
|
N as formatEmployeePayRate,
|
|
240
|
-
|
|
235
|
+
et as formatHoursDisplay,
|
|
241
236
|
O as getAdditionalEarnings,
|
|
242
|
-
|
|
237
|
+
ot as getAdditionalEarningsCompensations,
|
|
243
238
|
Z as getOvertimeHours,
|
|
244
|
-
|
|
245
|
-
ne as getPayrollType,
|
|
239
|
+
nt as getPayrollType,
|
|
246
240
|
y as getPrimaryJob,
|
|
247
241
|
X as getRegularHours,
|
|
248
|
-
|
|
249
|
-
|
|
242
|
+
st as getReimbursementCompensation,
|
|
243
|
+
tt as getReimbursements,
|
|
250
244
|
L as getTotalPtoHours,
|
|
251
245
|
V as useFormatEmployeePayRate
|
|
252
246
|
};
|