@gusto/embedded-react-sdk 0.38.0 → 0.40.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 +233 -0
- package/dist/assets/icons/percent-circle.svg.js +10 -0
- package/dist/assets/icons/percent-circle.svg.js.map +1 -0
- package/dist/assets/icons/plus-circle.svg.js +1 -1
- package/dist/assets/icons/plus-circle.svg.js.map +1 -1
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +5 -3
- package/dist/components/Common/DataView/DataCards/DataCards.js +59 -46
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +9 -7
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +4 -2
- package/dist/components/Common/DataView/DataTable/DataTable.js +95 -76
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +4 -3
- package/dist/components/Common/DataView/DataView.js +24 -22
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +33 -6
- package/dist/components/Common/DataView/useDataView.js +23 -20
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DataView/useSelectionState.d.ts +5 -0
- package/dist/components/Common/DataView/useSelectionState.js +8 -0
- package/dist/components/Common/DataView/useSelectionState.js.map +1 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +3 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +65 -71
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +10 -6
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
- package/dist/components/Common/EmptyData/EmptyData.js +15 -13
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.d.ts +2 -2
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js +2 -2
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js.map +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/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 +12 -12
- package/dist/components/Common/UI/Box/Box.d.ts +1 -1
- package/dist/components/Common/UI/Box/Box.js +9 -8
- package/dist/components/Common/UI/Box/Box.js.map +1 -1
- package/dist/components/Common/UI/Box/Box.module.scss.js +12 -8
- package/dist/components/Common/UI/Box/Box.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Box/BoxTypes.d.ts +2 -9
- package/dist/components/Common/UI/BoxHeader/BoxHeader.d.ts +2 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.js +23 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js +8 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +10 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js +7 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/index.d.ts +2 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +2 -2
- package/dist/components/Common/UI/Checkbox/Checkbox.js +60 -49
- package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +10 -6
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +6 -6
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +34 -36
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +12 -12
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +19 -12
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +6 -4
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +6 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +4 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/Heading/Heading.module.scss.js +15 -15
- package/dist/components/Common/UI/Input/Input.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.js +22 -22
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +1 -1
- package/dist/components/Common/UI/Table/Table.js +12 -12
- package/dist/components/Common/UI/Table/Table.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Table/TableTypes.d.ts +3 -3
- package/dist/components/Common/UI/Table/TableTypes.js +3 -3
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.js +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js +13 -13
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- 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 +3 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +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 +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -3
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.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/Form.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +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/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 +8 -9
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +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 +3 -5
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.d.ts +9 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +14 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/index.d.ts +5 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +25 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js +24 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +32 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +106 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
- 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 +17 -18
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -6
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +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 +6 -8
- package/dist/components/Company/Industry/Context.js.map +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 +3 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +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 +8 -10
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -3
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +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 +5 -7
- 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 +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +70 -68
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +7 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +37 -32
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +8 -10
- 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/shared/usePayScheduleForm/fields.d.ts +23 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +37 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/index.d.ts +5 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +55 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js +54 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +33 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +184 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -7
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +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/StateTaxesForm.js +33 -33
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +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/StateTaxesList.js +14 -14
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +2 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +14 -0
- package/dist/components/Company/exports/companyOnboarding.js +31 -0
- package/dist/components/Company/exports/companyOnboarding.js.map +1 -0
- package/dist/components/Contractor/Address/Address.js +3 -4
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +4 -4
- package/dist/components/Contractor/Address/useAddress.js +5 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +19 -20
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- 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/Payments/CreatePayment/CreatePayment.js +135 -126
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +77 -76
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +5 -7
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +83 -84
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -4
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +10 -10
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +67 -79
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +10 -12
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +47 -49
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +63 -65
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +4 -4
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +33 -35
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +73 -51
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/exports/contractorOnboarding.d.ts +7 -0
- package/dist/components/Contractor/exports/contractorOnboarding.js +17 -0
- package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -0
- package/dist/components/Employee/Compensation/Actions.js +5 -6
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +80 -77
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +27 -28
- 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/Compensation/shared/useCompensationForm/compensationSchema.d.ts +103 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +90 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.d.ts +9 -9
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +5 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +43 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +262 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +107 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -0
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +5 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +146 -0
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +5 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +12 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +5 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.js +25 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -0
- package/dist/components/Employee/Dashboard/DocumentsView.d.ts +7 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js +48 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +22 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.js +211 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/TaxesView.js +97 -0
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +8 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/index.d.ts +9 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +17 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +29 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +28 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +52 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +13 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +22 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +17 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +24 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -0
- package/dist/components/Employee/Dashboard/index.d.ts +14 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -12
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +17 -19
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -13
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -8
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- 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 +5 -6
- 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 +3 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +22 -22
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +9 -10
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +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 +3 -5
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.d.ts +53 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js +164 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/index.d.ts +5 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +150 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js +152 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +47 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js +179 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +2 -4
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +6 -8
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -12
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- 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 +6 -7
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
- 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 +5 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminProfile.d.ts +2 -0
- package/dist/components/Employee/Profile/AdminProfile.js +360 -0
- package/dist/components/Employee/Profile/AdminProfile.js.map +1 -0
- package/dist/components/Employee/Profile/AdminProfile.module.scss.js +10 -0
- package/dist/components/Employee/Profile/AdminProfile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/EmployeeProfile.d.ts +2 -0
- package/dist/components/Employee/Profile/EmployeeProfile.js +211 -0
- package/dist/components/Employee/Profile/EmployeeProfile.js.map +1 -0
- package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js +10 -0
- package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/Profile.d.ts +3 -3
- package/dist/components/Employee/Profile/Profile.js +25 -261
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js +51 -0
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.d.ts +8 -7
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/index.d.ts +1 -3
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +45 -0
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +154 -0
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +22 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +36 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +41 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +32 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +5 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +44 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +161 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.d.ts +3 -3
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.js +2 -2
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/index.d.ts +1 -3
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +46 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +135 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.d.ts +6 -4
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js +23 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js.map +1 -0
- package/dist/components/Employee/StateTaxes/Actions.js +8 -10
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -5
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +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 +10 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -5
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +5 -5
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -16
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +12 -13
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +2 -4
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.d.ts +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.js +7 -7
- package/dist/components/Employee/employee-list/management/ManagementEmployeeList.js.map +1 -0
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.d.ts +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.js +18 -20
- package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +1 -0
- package/dist/components/Employee/employee-list/onboarding/EmployeeList.d.ts +6 -0
- package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.js +7 -7
- package/dist/components/Employee/employee-list/onboarding/EmployeeList.js.map +1 -0
- package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeListView.d.ts +1 -1
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js +130 -0
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +1 -0
- package/dist/components/Employee/employee-list/shared/index.d.ts +2 -0
- package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.d.ts +8 -10
- package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.js +32 -28
- package/dist/components/Employee/employee-list/shared/useEmployeeList.js.map +1 -0
- package/dist/components/Employee/exports/employeeManagement.d.ts +6 -0
- package/dist/components/Employee/exports/employeeManagement.js +15 -0
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -0
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +14 -0
- package/dist/components/Employee/exports/employeeOnboarding.js +31 -0
- package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -0
- package/dist/components/Employee/index.d.ts +3 -2
- package/dist/components/Employee/index.js +24 -24
- package/dist/components/Flow/Flow.js +16 -18
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +28 -29
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +14 -14
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +11 -12
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -4
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -9
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -10
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +12 -14
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +74 -69
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +11 -13
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +19 -19
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -8
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -14
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -13
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +17 -17
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -2
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +16 -16
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +28 -28
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +22 -24
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +78 -79
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +224 -201
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +8 -8
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +79 -80
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +18 -18
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +104 -117
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +16 -18
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -3
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -7
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -4
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +12 -14
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +13 -13
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +1 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
- package/dist/components/Payroll/usePreparedPayrollData.js +10 -12
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +45 -42
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +55 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +2 -2
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +100 -43
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +124 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +19 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +18 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +166 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsTypes.d.ts +18 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +3 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +25 -55
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +66 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +71 -66
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +5 -5
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +8 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +71 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +12 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +206 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +20 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/index.d.ts +4 -2
- package/dist/components/UNSTABLE_TimeOff/index.js +18 -16
- package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/{TimeOffManagement/shared → shared}/EmployeeTable/EmployeeTableTypes.d.ts +3 -3
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.d.ts +30 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js +97 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +52 -50
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +10 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +28 -21
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -12
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ObservabilityProvider/useObservability.js +6 -6
- package/dist/contexts/ObservabilityProvider/useObservability.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +2 -0
- package/dist/contexts/ThemeProvider/theme.js +4 -2
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +2 -0
- package/dist/helpers/dateFormatting.js +38 -33
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.js +40 -33
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
- package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
- package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +9 -9
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +18 -12
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +32 -26
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -34
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Submit.json.js +16 -12
- package/dist/i18n/en/Contractor.Submit.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +26 -0
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -0
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +2 -2
- package/dist/i18n/en/Payroll.PayrollList.json.js +15 -15
- package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
- package/dist/i18n/en/common.json.d.ts +4 -1
- package/dist/i18n/en/common.json.js +5 -5
- package/dist/index.d.ts +16 -0
- package/dist/index.js +102 -26
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/collectErrors.js.map +1 -0
- package/dist/partner-hook-utils/composeErrorHandler.d.ts +24 -0
- package/dist/partner-hook-utils/composeErrorHandler.js +30 -0
- package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.d.ts +2 -2
- package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.d.ts +2 -2
- package/dist/partner-hook-utils/form/FormFieldsMetadataProvider.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.d.ts +2 -2
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -0
- package/dist/partner-hook-utils/form/buildFormSchema.d.ts +48 -0
- package/dist/partner-hook-utils/form/buildFormSchema.js +94 -0
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.d.ts +29 -3
- package/dist/partner-hook-utils/form/composeSubmitHandler.js +40 -0
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -0
- package/dist/partner-hook-utils/form/composeSubmitHandler.test.d.ts +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/CheckboxHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +34 -0
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.d.ts +3 -3
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.js +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/NumberInputHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +40 -0
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/RadioGroupHookField.d.ts +3 -3
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/RadioGroupHookField.js +10 -12
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +40 -0
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SwitchHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +34 -0
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -0
- package/dist/partner-hook-utils/form/fields/TextInputHookField.d.ts +12 -0
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +38 -0
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/index.d.ts +7 -7
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.d.ts +1 -1
- package/dist/partner-hook-utils/form/getFieldWithOptions.js.map +1 -0
- package/dist/partner-hook-utils/form/getFormSubmissionValues.js.map +1 -0
- package/dist/partner-hook-utils/form/getFormSubmissionValues.test.d.ts +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/index.d.ts +4 -6
- package/dist/partner-hook-utils/form/preprocessors.d.ts +3 -0
- package/dist/partner-hook-utils/form/preprocessors.js +15 -0
- package/dist/partner-hook-utils/form/preprocessors.js.map +1 -0
- package/dist/partner-hook-utils/form/resolveFieldError.d.ts +4 -0
- package/dist/partner-hook-utils/form/resolveFieldError.js +14 -0
- package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -0
- package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.d.ts +17 -0
- package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js +21 -0
- package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.d.ts +1 -1
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js +17 -0
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.d.ts +2 -2
- package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.d.ts +1 -1
- package/dist/partner-hook-utils/form/withOptions.js.map +1 -0
- package/dist/partner-hook-utils/index.d.ts +5 -0
- package/dist/{types/sdkHooks.d.ts → partner-hook-utils/types.d.ts} +38 -12
- package/dist/shared/constants.d.ts +11 -1
- package/dist/shared/constants.js +30 -26
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +228 -146
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +635 -165
- package/package.json +27 -31
- package/dist/UNSTABLE_Hooks.d.ts +0 -1
- package/dist/UNSTABLE_Hooks.js +0 -53
- package/dist/UNSTABLE_Hooks.js.map +0 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +0 -7
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +0 -1
- package/dist/components/Employee/EmployeeList/EmployeeListView.js +0 -132
- package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +0 -1
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +0 -1
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +0 -1
- package/dist/components/Employee/EmployeeList/index.d.ts +0 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +0 -1
- package/dist/components/Employee/Profile/Actions.d.ts +0 -1
- package/dist/components/Employee/Profile/Actions.js +0 -15
- package/dist/components/Employee/Profile/Actions.js.map +0 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +0 -33
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +0 -60
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +0 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +0 -8
- package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js.map +0 -1
- package/dist/components/Employee/Profile/Head.d.ts +0 -1
- package/dist/components/Employee/Profile/Head.js +0 -14
- package/dist/components/Employee/Profile/Head.js.map +0 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +0 -31
- package/dist/components/Employee/Profile/HomeAddress.js +0 -128
- package/dist/components/Employee/Profile/HomeAddress.js.map +0 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +0 -49
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +0 -146
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +0 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +0 -16
- package/dist/components/Employee/Profile/SelfPersonalDetails.js +0 -29
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +0 -1
- package/dist/components/Employee/Profile/WorkAddress.d.ts +0 -1
- package/dist/components/Employee/Profile/WorkAddress.js +0 -21
- package/dist/components/Employee/Profile/WorkAddress.js.map +0 -1
- package/dist/components/Employee/Profile/WorkAddress.module.scss.js +0 -8
- package/dist/components/Employee/Profile/WorkAddress.module.scss.js.map +0 -1
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.d.ts +0 -2
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js +0 -8
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js.map +0 -1
- package/dist/components/Employee/Profile/useProfile.d.ts +0 -16
- package/dist/components/Employee/Profile/useProfile.js +0 -22
- package/dist/components/Employee/Profile/useProfile.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +0 -26
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +0 -34
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +0 -3
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +0 -36
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +0 -42
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +0 -42
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +0 -36
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +0 -12
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +0 -40
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +0 -4
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +0 -13
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +0 -6
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +0 -17
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -8
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +0 -150
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +0 -97
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +0 -118
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +0 -7
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +0 -104
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +0 -259
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +0 -113
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +0 -45
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +0 -77
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +0 -153
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +0 -70
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +0 -68
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +0 -129
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +0 -24
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/index.d.ts +0 -9
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.d.ts +0 -6
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js +0 -50
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTable.d.ts +0 -2
- package/dist/helpers/collectErrors.js.map +0 -1
- package/dist/helpers/requiredIf.d.ts +0 -13
- package/dist/helpers/requiredIf.js +0 -8
- package/dist/helpers/requiredIf.js.map +0 -1
- package/dist/hooks/useErrorHandling.d.ts +0 -9
- package/dist/hooks/useErrorHandling.js +0 -12
- package/dist/hooks/useErrorHandling.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +0 -58
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +0 -34
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +0 -24
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +0 -1
- /package/dist/components/Employee/{Profile/getEmployeeAddressForProfile.test.d.ts → Compensation/shared/useCompensationForm/compensationSchemaParity.test.d.ts} +0 -0
- /package/dist/components/UNSTABLE_TimeOff/{TimeOffManagement/shared → shared}/EmployeeTable/index.d.ts +0 -0
- /package/dist/components/{UNSTABLE_Hooks/form/composeSubmitHandler.test.d.ts → UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts} +0 -0
- /package/dist/{components/UNSTABLE_Hooks/form/deriveFieldsMetadata.test.d.ts → hooks/useCompanyPaymentSpeed.test.d.ts} +0 -0
- /package/dist/{helpers → partner-hook-utils}/collectErrors.d.ts +0 -0
- /package/dist/{helpers → partner-hook-utils}/collectErrors.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks/form/getFormSubmissionValues.test.d.ts → partner-hook-utils/composeErrorHandler.test.d.ts} +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.js +0 -0
- /package/dist/{hooks/useErrorHandling.test.d.ts → partner-hook-utils/form/buildFormSchema.test.d.ts} +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.js +0 -0
package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecoveryCasesResubmit.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useRecoveryCasesRedebitMutation,\n mutationKeyRecoveryCasesRedebit,\n} from '@gusto/embedded-api/react-query/recoveryCasesRedebit'\nimport { useRecoveryCasesGet } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport type { RecoveryCasesContextInterface } from '../RecoveryCasesComponents'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { recoveryCasesEvents, type EventType } from '@/shared/constants'\n\nconst RECOVERY_CASES_RESUBMIT_FORM_ID = 'gusto-sdk-recovery-cases-resubmit-form'\n\ninterface RecoveryCasesResubmitProps extends BaseComponentInterface<'Payroll.RecoveryCasesResubmit'> {\n recoveryCaseId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function RecoveryCasesResubmit(props: RecoveryCasesResubmitProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ dictionary, recoveryCaseId }: RecoveryCasesResubmitProps) {\n useComponentDictionary('Payroll.RecoveryCasesResubmit', dictionary)\n const { Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n const { companyId } = useFlow<RecoveryCasesContextInterface>()\n\n const { data: recoveryCasesData } = useRecoveryCasesGet({\n companyUuid: companyId,\n })\n\n const recoveryCase = recoveryCasesData?.recoveryCaseList?.find(rc => rc.uuid === recoveryCaseId)\n\n const { title, subtitle, description } = useRecoveryCaseErrorCode(\n recoveryCase?.latestErrorCode ?? undefined,\n )\n\n const redebitMutation = useRecoveryCasesRedebitMutation()\n\n const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n await baseSubmitHandler({}, async () => {\n await redebitMutation.mutateAsync({\n request: {\n recoveryCaseUuid: recoveryCaseId,\n },\n })\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE, {\n recoveryCaseId,\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {title && <Heading as=\"h2\">{title}</Heading>}\n {subtitle && <Text>{subtitle}</Text>}\n {description.length > 0 && description}\n {/*\n This empty form is used to connect the Footer's submit button to the submission logic\n via the form attribute. This is semantically incorrect and hidden from assistive tech.\n */}\n <Form id={RECOVERY_CASES_RESUBMIT_FORM_ID} onSubmit={onSubmit} aria-hidden=\"true\">\n {/* Empty form - submission triggered by footer button via form attribute */}\n </Form>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Button } = useComponentContext()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyRecoveryCasesRedebit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_CANCEL)\n }\n\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={RECOVERY_CASES_RESUBMIT_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.resubmit')}\n </Button>\n </Flex>\n )\n}\n\nRecoveryCasesResubmit.Footer = Footer\n"],"names":["RECOVERY_CASES_RESUBMIT_FORM_ID","RecoveryCasesResubmit","props","jsx","BaseComponent","Root","dictionary","recoveryCaseId","useComponentDictionary","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","companyId","useFlow","recoveryCasesData","useRecoveryCasesGet","recoveryCase","rc","title","subtitle","description","useRecoveryCaseErrorCode","redebitMutation","useRecoveryCasesRedebitMutation","onSubmit","e","recoveryCasesEvents","jsxs","Flex","Form","Footer","useI18n","t","useTranslation","Button","isPending","useIsMutating","mutationKeyRecoveryCasesRedebit"],"mappings":"
|
|
1
|
+
{"version":3,"file":"RecoveryCasesResubmit.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useRecoveryCasesRedebitMutation,\n mutationKeyRecoveryCasesRedebit,\n} from '@gusto/embedded-api/react-query/recoveryCasesRedebit'\nimport { useRecoveryCasesGet } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport type { RecoveryCasesContextInterface } from '../RecoveryCasesComponents'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { recoveryCasesEvents, type EventType } from '@/shared/constants'\n\nconst RECOVERY_CASES_RESUBMIT_FORM_ID = 'gusto-sdk-recovery-cases-resubmit-form'\n\ninterface RecoveryCasesResubmitProps extends BaseComponentInterface<'Payroll.RecoveryCasesResubmit'> {\n recoveryCaseId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function RecoveryCasesResubmit(props: RecoveryCasesResubmitProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ dictionary, recoveryCaseId }: RecoveryCasesResubmitProps) {\n useComponentDictionary('Payroll.RecoveryCasesResubmit', dictionary)\n const { Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n const { companyId } = useFlow<RecoveryCasesContextInterface>()\n\n const { data: recoveryCasesData } = useRecoveryCasesGet({\n companyUuid: companyId,\n })\n\n const recoveryCase = recoveryCasesData?.recoveryCaseList?.find(rc => rc.uuid === recoveryCaseId)\n\n const { title, subtitle, description } = useRecoveryCaseErrorCode(\n recoveryCase?.latestErrorCode ?? undefined,\n )\n\n const redebitMutation = useRecoveryCasesRedebitMutation()\n\n const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n await baseSubmitHandler({}, async () => {\n await redebitMutation.mutateAsync({\n request: {\n recoveryCaseUuid: recoveryCaseId,\n },\n })\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE, {\n recoveryCaseId,\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {title && <Heading as=\"h2\">{title}</Heading>}\n {subtitle && <Text>{subtitle}</Text>}\n {description.length > 0 && description}\n {/*\n This empty form is used to connect the Footer's submit button to the submission logic\n via the form attribute. This is semantically incorrect and hidden from assistive tech.\n */}\n <Form id={RECOVERY_CASES_RESUBMIT_FORM_ID} onSubmit={onSubmit} aria-hidden=\"true\">\n {/* Empty form - submission triggered by footer button via form attribute */}\n </Form>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Button } = useComponentContext()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyRecoveryCasesRedebit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_CANCEL)\n }\n\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={RECOVERY_CASES_RESUBMIT_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.resubmit')}\n </Button>\n </Flex>\n )\n}\n\nRecoveryCasesResubmit.Footer = Footer\n"],"names":["RECOVERY_CASES_RESUBMIT_FORM_ID","RecoveryCasesResubmit","props","jsx","BaseComponent","Root","dictionary","recoveryCaseId","useComponentDictionary","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","companyId","useFlow","recoveryCasesData","useRecoveryCasesGet","recoveryCase","rc","title","subtitle","description","useRecoveryCaseErrorCode","redebitMutation","useRecoveryCasesRedebitMutation","onSubmit","e","recoveryCasesEvents","jsxs","Flex","Form","Footer","useI18n","t","useTranslation","Button","isPending","useIsMutating","mutationKeyRecoveryCasesRedebit"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMA,IAAkC;AAOjC,SAASC,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,gBAAAC,KAA8C;AACxE,EAAAC,EAAuB,iCAAiCF,CAAU;AAClE,QAAM,EAAE,SAAAG,GAAS,MAAAC,EAAA,IAASC,EAAA,GACpB,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAEhB,EAAE,MAAMC,EAAA,IAAsBC,EAAoB;AAAA,IACtD,aAAaH;AAAA,EAAA,CACd,GAEKI,IAAeF,GAAmB,kBAAkB,KAAK,CAAAG,MAAMA,EAAG,SAASb,CAAc,GAEzF,EAAE,OAAAc,GAAO,UAAAC,GAAU,aAAAC,EAAA,IAAgBC;AAAA,IACvCL,GAAc,mBAAmB;AAAA,EAAA,GAG7BM,IAAkBC,EAAA,GAElBC,IAAW,OAAOC,MAAwC;AAC9D,IAAAA,EAAE,eAAA,GACF,MAAMf,EAAkB,CAAA,GAAI,YAAY;AACtC,YAAMY,EAAgB,YAAY;AAAA,QAChC,SAAS;AAAA,UACP,kBAAkBlB;AAAA,QAAA;AAAA,MACpB,CACD,GACDK,EAAQiB,EAAoB,6BAA6B;AAAA,QACvD,gBAAAtB;AAAA,MAAA,CACD;AAAA,IACH,CAAC;AAAA,EACH;AAEA,SACE,gBAAAuB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,IAAAV,KAAS,gBAAAlB,EAACM,GAAA,EAAQ,IAAG,MAAM,UAAAY,GAAM;AAAA,IACjCC,KAAY,gBAAAnB,EAACO,GAAA,EAAM,UAAAY,EAAA,CAAS;AAAA,IAC5BC,EAAY,SAAS,KAAKA;AAAA,sBAK1BS,GAAA,EAAK,IAAIhC,GAAiC,UAAA2B,GAAoB,eAAY,OAAA,CAE3E;AAAA,EAAA,GACF;AAEJ;AAEA,MAAMM,IAAS,CAAC,EAAE,SAAArB,QAA4D;AAC5E,EAAAsB,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GACtD,EAAE,QAAAC,EAAA,IAAW1B,EAAA,GAKb2B,IAHaC,EAAc;AAAA,IAC/B,aAAaC,EAAA;AAAA,EAAgC,CAC9C,IAC8B;AAM/B,SACE,gBAAAV,EAACC,GAAA,EAAK,gBAAe,YAAW,KAAK,IACnC,UAAA;AAAA,IAAA,gBAAA5B,EAACkC,GAAA,EAAO,SAAQ,aAAY,SANX,MAAM;AACzB,MAAAzB,EAAQiB,EAAoB,6BAA6B;AAAA,IAC3D,GAIuD,YAAYS,GAC5D,UAAAH,EAAE,YAAY,EAAA,CACjB;AAAA,IACA,gBAAAhC;AAAA,MAACkC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAMrC;AAAA,QACN,WAAWsC;AAAA,QAEV,YAAE,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEArC,EAAsB,SAASgC;"}
|
|
@@ -2,8 +2,6 @@ import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as a, Trans as c } from "react-i18next";
|
|
3
3
|
import p from "./RecoveryCaseErrorCode.module.scss.js";
|
|
4
4
|
import { Flex as C } from "../../Common/Flex/Flex.js";
|
|
5
|
-
import "classnames";
|
|
6
|
-
import "../../../shared/constants.js";
|
|
7
5
|
import { useComponentContext as R } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
6
|
import { useI18n as f } from "../../../i18n/I18n.js";
|
|
9
7
|
function h(s) {
|
|
@@ -20,7 +18,7 @@ function h(s) {
|
|
|
20
18
|
return "bankError";
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
|
-
function
|
|
21
|
+
function v(s) {
|
|
24
22
|
f("Payroll.RecoveryCasesResubmit");
|
|
25
23
|
const { t: r } = a("Payroll.RecoveryCasesResubmit"), { Text: o } = R();
|
|
26
24
|
if (!s)
|
|
@@ -61,6 +59,6 @@ function E(s) {
|
|
|
61
59
|
};
|
|
62
60
|
}
|
|
63
61
|
export {
|
|
64
|
-
|
|
62
|
+
v as useRecoveryCaseErrorCode
|
|
65
63
|
};
|
|
66
64
|
//# sourceMappingURL=useRecoveryCaseErrorCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRecoveryCaseErrorCode.js","sources":["../../../../src/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport styles from './RecoveryCaseErrorCode.module.scss'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport interface RecoveryCaseErrorCodeContent {\n title: string | null\n subtitle: string | null\n description: ReactNode[]\n}\n\ntype ErrorCodeKey = 'R01' | 'R02' | 'R16' | 'R29' | 'bankError'\n\nfunction getErrorCodeKey(errorCode: string | null | undefined): ErrorCodeKey {\n switch (errorCode) {\n case 'R01':\n return 'R01'\n case 'R02':\n return 'R02'\n case 'R16':\n return 'R16'\n case 'R29':\n return 'R29'\n default:\n return 'bankError'\n }\n}\n\nexport function useRecoveryCaseErrorCode(\n errorCode: string | null | undefined,\n): RecoveryCaseErrorCodeContent {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Text } = useComponentContext()\n\n if (!errorCode) {\n return {\n title: null,\n subtitle: null,\n description: [],\n }\n }\n\n const errorCodeKey = getErrorCodeKey(errorCode)\n\n const transComponents = {\n medium: <Text as=\"span\" weight=\"medium\" />,\n }\n\n const description: ReactNode[] = [\n <Text key=\"body\">\n <Trans t={t} i18nKey={`errorCodes.${errorCodeKey}.body`} components={transComponents} />\n </Text>,\n ]\n\n if (errorCodeKey === 'R29') {\n const achCodes = Object.values(t('errorCodes.R29.achCodes', { returnObjects: true }))\n description.push(\n <Flex key=\"instruction\" flexDirection=\"column\" gap={16}>\n <Text>{t('errorCodes.R29.listDescription')}</Text>\n <ul className={styles.compactList}>\n {achCodes.map((code, index) => (\n <li key={index}>{code}</li>\n ))}\n </ul>\n <Text>\n <Trans t={t} i18nKey=\"errorCodes.R29.instruction\" components={transComponents} />\n </Text>\n </Flex>,\n )\n } else {\n const instruction = t(`errorCodes.${errorCodeKey}.instruction`)\n if (instruction) {\n description.push(\n <Text key=\"instruction\">\n <Trans\n t={t}\n i18nKey={`errorCodes.${errorCodeKey}.instruction`}\n components={transComponents}\n />\n </Text>,\n )\n }\n }\n\n return {\n title: t(`errorCodes.${errorCodeKey}.title`),\n subtitle: t(`errorCodes.${errorCodeKey}.subtitle`),\n description,\n }\n}\n"],"names":["getErrorCodeKey","errorCode","useRecoveryCaseErrorCode","useI18n","t","useTranslation","Text","useComponentContext","errorCodeKey","transComponents","jsx","description","Trans","achCodes","jsxs","Flex","styles","code","index"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRecoveryCaseErrorCode.js","sources":["../../../../src/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport styles from './RecoveryCaseErrorCode.module.scss'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport interface RecoveryCaseErrorCodeContent {\n title: string | null\n subtitle: string | null\n description: ReactNode[]\n}\n\ntype ErrorCodeKey = 'R01' | 'R02' | 'R16' | 'R29' | 'bankError'\n\nfunction getErrorCodeKey(errorCode: string | null | undefined): ErrorCodeKey {\n switch (errorCode) {\n case 'R01':\n return 'R01'\n case 'R02':\n return 'R02'\n case 'R16':\n return 'R16'\n case 'R29':\n return 'R29'\n default:\n return 'bankError'\n }\n}\n\nexport function useRecoveryCaseErrorCode(\n errorCode: string | null | undefined,\n): RecoveryCaseErrorCodeContent {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Text } = useComponentContext()\n\n if (!errorCode) {\n return {\n title: null,\n subtitle: null,\n description: [],\n }\n }\n\n const errorCodeKey = getErrorCodeKey(errorCode)\n\n const transComponents = {\n medium: <Text as=\"span\" weight=\"medium\" />,\n }\n\n const description: ReactNode[] = [\n <Text key=\"body\">\n <Trans t={t} i18nKey={`errorCodes.${errorCodeKey}.body`} components={transComponents} />\n </Text>,\n ]\n\n if (errorCodeKey === 'R29') {\n const achCodes = Object.values(t('errorCodes.R29.achCodes', { returnObjects: true }))\n description.push(\n <Flex key=\"instruction\" flexDirection=\"column\" gap={16}>\n <Text>{t('errorCodes.R29.listDescription')}</Text>\n <ul className={styles.compactList}>\n {achCodes.map((code, index) => (\n <li key={index}>{code}</li>\n ))}\n </ul>\n <Text>\n <Trans t={t} i18nKey=\"errorCodes.R29.instruction\" components={transComponents} />\n </Text>\n </Flex>,\n )\n } else {\n const instruction = t(`errorCodes.${errorCodeKey}.instruction`)\n if (instruction) {\n description.push(\n <Text key=\"instruction\">\n <Trans\n t={t}\n i18nKey={`errorCodes.${errorCodeKey}.instruction`}\n components={transComponents}\n />\n </Text>,\n )\n }\n }\n\n return {\n title: t(`errorCodes.${errorCodeKey}.title`),\n subtitle: t(`errorCodes.${errorCodeKey}.subtitle`),\n description,\n }\n}\n"],"names":["getErrorCodeKey","errorCode","useRecoveryCaseErrorCode","useI18n","t","useTranslation","Text","useComponentContext","errorCodeKey","transComponents","jsx","description","Trans","achCodes","jsxs","Flex","styles","code","index"],"mappings":";;;;;;AAeA,SAASA,EAAgBC,GAAoD;AAC3E,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EAAA;AAEb;AAEO,SAASC,EACdD,GAC8B;AAC9B,EAAAE,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GACtD,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,MAAI,CAACN;AACH,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,aAAa,CAAA;AAAA,IAAC;AAIlB,QAAMO,IAAeR,EAAgBC,CAAS,GAExCQ,IAAkB;AAAA,IACtB,QAAQ,gBAAAC,EAACJ,GAAA,EAAK,IAAG,QAAO,QAAO,SAAA,CAAS;AAAA,EAAA,GAGpCK,IAA2B;AAAA,IAC/B,gBAAAD,EAACJ,GAAA,EACC,UAAA,gBAAAI,EAACE,GAAA,EAAM,GAAAR,GAAM,SAAS,cAAcI,CAAY,SAAS,YAAYC,EAAA,CAAiB,EAAA,GAD9E,MAEV;AAAA,EAAA;AAGF,MAAID,MAAiB,OAAO;AAC1B,UAAMK,IAAW,OAAO,OAAOT,EAAE,2BAA2B,EAAE,eAAe,GAAA,CAAM,CAAC;AACpF,IAAAO,EAAY;AAAA,MACV,gBAAAG,EAACC,GAAA,EAAuB,eAAc,UAAS,KAAK,IAClD,UAAA;AAAA,QAAA,gBAAAL,EAACJ,GAAA,EAAM,UAAAF,EAAE,gCAAgC,EAAA,CAAE;AAAA,QAC3C,gBAAAM,EAAC,MAAA,EAAG,WAAWM,EAAO,aACnB,UAAAH,EAAS,IAAI,CAACI,GAAMC,MACnB,gBAAAR,EAAC,MAAA,EAAgB,UAAAO,KAARC,CAAa,CACvB,GACH;AAAA,QACA,gBAAAR,EAACJ,KACC,UAAA,gBAAAI,EAACE,GAAA,EAAM,GAAAR,GAAM,SAAQ,8BAA6B,YAAYK,EAAA,CAAiB,EAAA,CACjF;AAAA,MAAA,EAAA,GATQ,aAUV;AAAA,IAAA;AAAA,EAEJ;AAEE,IADoBL,EAAE,cAAcI,CAAY,cAAc,KAE5DG,EAAY;AAAA,wBACTL,GAAA,EACC,UAAA,gBAAAI;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,GAAAR;AAAA,UACA,SAAS,cAAcI,CAAY;AAAA,UACnC,YAAYC;AAAA,QAAA;AAAA,MAAA,KAJN,aAMV;AAAA,IAAA;AAKN,SAAO;AAAA,IACL,OAAOL,EAAE,cAAcI,CAAY,QAAQ;AAAA,IAC3C,UAAUJ,EAAE,cAAcI,CAAY,WAAW;AAAA,IACjD,aAAAG;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,92 +1,96 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useForm as
|
|
4
|
-
import { zodResolver as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { usePayrollsCreateOffCycleMutation as
|
|
7
|
-
import { WithholdingPayPeriod as
|
|
8
|
-
import { RFCDate as
|
|
9
|
-
import { usePaySchedulesGetAllSuspense as
|
|
10
|
-
import { useOffCyclePayPeriodDateValidation as
|
|
11
|
-
import { createTransitionCreationSchema as
|
|
12
|
-
import { TransitionCreationPresentation as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
import { useState as P, useCallback as d, useMemo as T } from "react";
|
|
3
|
+
import { useForm as A, FormProvider as I } from "react-hook-form";
|
|
4
|
+
import { zodResolver as N } from "@hookform/resolvers/zod";
|
|
5
|
+
import { useTranslation as B } from "react-i18next";
|
|
6
|
+
import { usePayrollsCreateOffCycleMutation as V } from "@gusto/embedded-api/react-query/payrollsCreateOffCycle";
|
|
7
|
+
import { WithholdingPayPeriod as q, OffCycleReason as U } from "@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls";
|
|
8
|
+
import { RFCDate as h } from "@gusto/embedded-api/types/rfcdate";
|
|
9
|
+
import { usePaySchedulesGetAllSuspense as j } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
|
|
10
|
+
import { useOffCyclePayPeriodDateValidation as z } from "../OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js";
|
|
11
|
+
import { createTransitionCreationSchema as G } from "./TransitionCreationTypes.js";
|
|
12
|
+
import { TransitionCreationPresentation as H } from "./TransitionCreationPresentation.js";
|
|
13
|
+
import { useCompanyPaymentSpeed as K } from "../../../hooks/useCompanyPaymentSpeed.js";
|
|
14
|
+
import { BaseComponent as _ } from "../../Base/Base.js";
|
|
15
|
+
import { useBase as J } from "../../Base/useBase.js";
|
|
16
|
+
import { useComponentDictionary as L, useI18n as u } from "../../../i18n/I18n.js";
|
|
17
|
+
import { componentEvents as Q } from "../../../shared/constants.js";
|
|
18
|
+
import { SDKInternalError as X } from "../../../types/sdkError.js";
|
|
19
|
+
import { Form as Y } from "../../Common/Form/Form.js";
|
|
20
|
+
function Po(n) {
|
|
21
|
+
return /* @__PURE__ */ t(_, { ...n, children: /* @__PURE__ */ t(Z, { ...n }) });
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function Z({
|
|
23
24
|
dictionary: n,
|
|
24
|
-
companyId:
|
|
25
|
-
startDate:
|
|
26
|
-
endDate:
|
|
27
|
-
payScheduleUuid:
|
|
25
|
+
companyId: r,
|
|
26
|
+
startDate: f,
|
|
27
|
+
endDate: p,
|
|
28
|
+
payScheduleUuid: a
|
|
28
29
|
}) {
|
|
29
|
-
L("Payroll.TransitionCreation", n),
|
|
30
|
-
const { t:
|
|
31
|
-
withholdingPayPeriod:
|
|
30
|
+
L("Payroll.TransitionCreation", n), u("Payroll.TransitionCreation"), u("Payroll.OffCycleDeductionsSetting"), u("Payroll.OffCycleTaxWithholding");
|
|
31
|
+
const { t: l } = B("Payroll.TransitionCreation"), { onEvent: D, baseSubmitHandler: S } = J(), { paymentSpeedDays: s } = K(r), { minCheckDate: y } = z(s), { mutateAsync: x, isPending: W } = V(), { data: g } = j({ companyId: r }), [c, R] = P({
|
|
32
|
+
withholdingPayPeriod: q.EveryOtherWeek,
|
|
32
33
|
withholdingRate: "regular"
|
|
33
|
-
}), [
|
|
34
|
-
|
|
35
|
-
}, []),
|
|
36
|
-
R(o),
|
|
37
|
-
}, []),
|
|
38
|
-
|
|
39
|
-
}, []),
|
|
40
|
-
const e = (
|
|
34
|
+
}), [k, m] = P(!1), w = d(() => {
|
|
35
|
+
m(!0);
|
|
36
|
+
}, []), O = d((o) => {
|
|
37
|
+
R(o), m(!1);
|
|
38
|
+
}, []), E = d(() => {
|
|
39
|
+
m(!1);
|
|
40
|
+
}, []), M = T(() => {
|
|
41
|
+
const e = (g.paySchedules ?? []).find((i) => i.uuid === a);
|
|
41
42
|
return e?.customName ?? e?.name ?? null;
|
|
42
|
-
}, [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
),
|
|
46
|
-
|
|
43
|
+
}, [g, a]), b = (o, e) => (
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
l(o, e)
|
|
46
|
+
), v = T(
|
|
47
|
+
() => G(b, y, s),
|
|
48
|
+
[l, y, s]
|
|
49
|
+
), C = A({
|
|
50
|
+
resolver: N(v),
|
|
47
51
|
defaultValues: {
|
|
48
52
|
checkDate: null,
|
|
49
53
|
skipRegularDeductions: !1
|
|
50
54
|
}
|
|
51
|
-
}),
|
|
52
|
-
o.checkDate && await
|
|
55
|
+
}), F = async (o) => {
|
|
56
|
+
o.checkDate && await S(o, async () => {
|
|
53
57
|
const e = await x({
|
|
54
58
|
request: {
|
|
55
|
-
companyId:
|
|
59
|
+
companyId: r,
|
|
56
60
|
requestBody: {
|
|
57
61
|
offCycle: !0,
|
|
58
|
-
offCycleReason:
|
|
59
|
-
startDate: new
|
|
60
|
-
endDate: new
|
|
61
|
-
checkDate: new
|
|
62
|
-
payScheduleUuid:
|
|
62
|
+
offCycleReason: U.TransitionFromOldPaySchedule,
|
|
63
|
+
startDate: new h(f),
|
|
64
|
+
endDate: new h(p),
|
|
65
|
+
checkDate: new h(o.checkDate),
|
|
66
|
+
payScheduleUuid: a,
|
|
63
67
|
skipRegularDeductions: o.skipRegularDeductions,
|
|
64
|
-
withholdingPayPeriod:
|
|
65
|
-
fixedWithholdingRate:
|
|
68
|
+
withholdingPayPeriod: c.withholdingPayPeriod,
|
|
69
|
+
fixedWithholdingRate: c.withholdingRate === "supplemental"
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
}), i = e.payrollUnprocessed?.payrollUuid ?? e.payrollUnprocessed?.uuid;
|
|
69
73
|
if (!i)
|
|
70
|
-
throw new
|
|
71
|
-
|
|
74
|
+
throw new X(l("errors.missingPayrollId"));
|
|
75
|
+
D(Q.TRANSITION_CREATED, { payrollUuid: i });
|
|
72
76
|
});
|
|
73
77
|
};
|
|
74
|
-
return /* @__PURE__ */ t(I, { ...
|
|
75
|
-
|
|
78
|
+
return /* @__PURE__ */ t(I, { ...C, children: /* @__PURE__ */ t(Y, { onSubmit: C.handleSubmit(F), children: /* @__PURE__ */ t(
|
|
79
|
+
H,
|
|
76
80
|
{
|
|
77
|
-
startDate:
|
|
78
|
-
endDate:
|
|
79
|
-
payScheduleName:
|
|
81
|
+
startDate: f,
|
|
82
|
+
endDate: p,
|
|
83
|
+
payScheduleName: M,
|
|
80
84
|
isPending: W,
|
|
81
|
-
taxWithholdingConfig:
|
|
82
|
-
isTaxWithholdingModalOpen:
|
|
83
|
-
onTaxWithholdingEditClick:
|
|
84
|
-
onTaxWithholdingModalDone:
|
|
85
|
-
onTaxWithholdingModalCancel:
|
|
85
|
+
taxWithholdingConfig: c,
|
|
86
|
+
isTaxWithholdingModalOpen: k,
|
|
87
|
+
onTaxWithholdingEditClick: w,
|
|
88
|
+
onTaxWithholdingModalDone: O,
|
|
89
|
+
onTaxWithholdingModalCancel: E
|
|
86
90
|
}
|
|
87
91
|
) }) });
|
|
88
92
|
}
|
|
89
93
|
export {
|
|
90
|
-
|
|
94
|
+
Po as TransitionCreation
|
|
91
95
|
};
|
|
92
96
|
//# sourceMappingURL=TransitionCreation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransitionCreation.js","sources":["../../../../src/components/Payroll/TransitionCreation/TransitionCreation.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport { usePayrollsCreateOffCycleMutation } from '@gusto/embedded-api/react-query/payrollsCreateOffCycle'\nimport {\n OffCycleReason,\n WithholdingPayPeriod,\n} from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { useOffCyclePayPeriodDateValidation } from '../OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation'\nimport type { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { TransitionCreationProps, TransitionCreationFormData } from './TransitionCreationTypes'\nimport { createTransitionCreationSchema } from './TransitionCreationTypes'\nimport { TransitionCreationPresentation } from './TransitionCreationPresentation'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { Form } from '@/components/Common/Form'\n\nexport function TransitionCreation(props: TransitionCreationProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({\n dictionary,\n companyId,\n startDate,\n endDate,\n payScheduleUuid,\n}: TransitionCreationProps) {\n useComponentDictionary('Payroll.TransitionCreation', dictionary)\n useI18n('Payroll.TransitionCreation')\n useI18n('Payroll.OffCycleDeductionsSetting')\n useI18n('Payroll.OffCycleTaxWithholding')\n\n const { t } = useTranslation('Payroll.TransitionCreation')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { minCheckDate } = useOffCyclePayPeriodDateValidation()\n const { mutateAsync: createTransitionPayroll, isPending } = usePayrollsCreateOffCycleMutation()\n\n const { data: paySchedulesData } = usePaySchedulesGetAllSuspense({ companyId })\n\n const [taxWithholdingConfig, setTaxWithholdingConfig] = useState<OffCycleTaxWithholdingConfig>({\n withholdingPayPeriod: WithholdingPayPeriod.EveryOtherWeek,\n withholdingRate: 'regular',\n })\n const [isTaxWithholdingModalOpen, setIsTaxWithholdingModalOpen] = useState(false)\n\n const handleTaxWithholdingEditClick = useCallback(() => {\n setIsTaxWithholdingModalOpen(true)\n }, [])\n\n const handleTaxWithholdingModalDone = useCallback((config: OffCycleTaxWithholdingConfig) => {\n setTaxWithholdingConfig(config)\n setIsTaxWithholdingModalOpen(false)\n }, [])\n\n const handleTaxWithholdingModalCancel = useCallback(() => {\n setIsTaxWithholdingModalOpen(false)\n }, [])\n\n const payScheduleName = useMemo(() => {\n const schedules = paySchedulesData.
|
|
1
|
+
{"version":3,"file":"TransitionCreation.js","sources":["../../../../src/components/Payroll/TransitionCreation/TransitionCreation.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport { usePayrollsCreateOffCycleMutation } from '@gusto/embedded-api/react-query/payrollsCreateOffCycle'\nimport {\n OffCycleReason,\n WithholdingPayPeriod,\n} from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { useOffCyclePayPeriodDateValidation } from '../OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation'\nimport type { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { TransitionCreationProps, TransitionCreationFormData } from './TransitionCreationTypes'\nimport { createTransitionCreationSchema } from './TransitionCreationTypes'\nimport { TransitionCreationPresentation } from './TransitionCreationPresentation'\nimport { useCompanyPaymentSpeed } from '@/hooks/useCompanyPaymentSpeed'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { Form } from '@/components/Common/Form'\n\nexport function TransitionCreation(props: TransitionCreationProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({\n dictionary,\n companyId,\n startDate,\n endDate,\n payScheduleUuid,\n}: TransitionCreationProps) {\n useComponentDictionary('Payroll.TransitionCreation', dictionary)\n useI18n('Payroll.TransitionCreation')\n useI18n('Payroll.OffCycleDeductionsSetting')\n useI18n('Payroll.OffCycleTaxWithholding')\n\n const { t } = useTranslation('Payroll.TransitionCreation')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { paymentSpeedDays } = useCompanyPaymentSpeed(companyId)\n\n const { minCheckDate } = useOffCyclePayPeriodDateValidation(paymentSpeedDays)\n const { mutateAsync: createTransitionPayroll, isPending } = usePayrollsCreateOffCycleMutation()\n\n const { data: paySchedulesData } = usePaySchedulesGetAllSuspense({ companyId })\n\n const [taxWithholdingConfig, setTaxWithholdingConfig] = useState<OffCycleTaxWithholdingConfig>({\n withholdingPayPeriod: WithholdingPayPeriod.EveryOtherWeek,\n withholdingRate: 'regular',\n })\n const [isTaxWithholdingModalOpen, setIsTaxWithholdingModalOpen] = useState(false)\n\n const handleTaxWithholdingEditClick = useCallback(() => {\n setIsTaxWithholdingModalOpen(true)\n }, [])\n\n const handleTaxWithholdingModalDone = useCallback((config: OffCycleTaxWithholdingConfig) => {\n setTaxWithholdingConfig(config)\n setIsTaxWithholdingModalOpen(false)\n }, [])\n\n const handleTaxWithholdingModalCancel = useCallback(() => {\n setIsTaxWithholdingModalOpen(false)\n }, [])\n\n const payScheduleName = useMemo(() => {\n const schedules = paySchedulesData.paySchedules ?? []\n const match = schedules.find(s => s.uuid === payScheduleUuid)\n return match?.customName ?? match?.name ?? null\n }, [paySchedulesData, payScheduleUuid])\n\n const translateValidation = (key: string, options?: Record<string, unknown>): string =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n t(key as any, options as any) as string\n\n const schema = useMemo(\n () => createTransitionCreationSchema(translateValidation, minCheckDate, paymentSpeedDays),\n [t, minCheckDate, paymentSpeedDays],\n )\n\n const methods = useForm<TransitionCreationFormData>({\n resolver: zodResolver(schema),\n defaultValues: {\n checkDate: null,\n skipRegularDeductions: false,\n },\n })\n\n const onSubmit = async (data: TransitionCreationFormData) => {\n if (!data.checkDate) return\n\n await baseSubmitHandler(data, async () => {\n const response = await createTransitionPayroll({\n request: {\n companyId,\n requestBody: {\n offCycle: true,\n offCycleReason: OffCycleReason.TransitionFromOldPaySchedule,\n startDate: new RFCDate(startDate),\n endDate: new RFCDate(endDate),\n checkDate: new RFCDate(data.checkDate!),\n payScheduleUuid,\n skipRegularDeductions: data.skipRegularDeductions,\n withholdingPayPeriod: taxWithholdingConfig.withholdingPayPeriod,\n fixedWithholdingRate: taxWithholdingConfig.withholdingRate === 'supplemental',\n },\n },\n })\n\n const payrollUuid =\n response.payrollUnprocessed?.payrollUuid ?? response.payrollUnprocessed?.uuid\n\n if (!payrollUuid) {\n throw new SDKInternalError(t('errors.missingPayrollId'))\n }\n\n onEvent(componentEvents.TRANSITION_CREATED, { payrollUuid })\n })\n }\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)}>\n <TransitionCreationPresentation\n startDate={startDate}\n endDate={endDate}\n payScheduleName={payScheduleName}\n isPending={isPending}\n taxWithholdingConfig={taxWithholdingConfig}\n isTaxWithholdingModalOpen={isTaxWithholdingModalOpen}\n onTaxWithholdingEditClick={handleTaxWithholdingEditClick}\n onTaxWithholdingModalDone={handleTaxWithholdingModalDone}\n onTaxWithholdingModalCancel={handleTaxWithholdingModalCancel}\n />\n </Form>\n </FormProvider>\n )\n}\n"],"names":["TransitionCreation","props","jsx","BaseComponent","Root","dictionary","companyId","startDate","endDate","payScheduleUuid","useComponentDictionary","useI18n","t","useTranslation","onEvent","baseSubmitHandler","useBase","paymentSpeedDays","useCompanyPaymentSpeed","minCheckDate","useOffCyclePayPeriodDateValidation","createTransitionPayroll","isPending","usePayrollsCreateOffCycleMutation","paySchedulesData","usePaySchedulesGetAllSuspense","taxWithholdingConfig","setTaxWithholdingConfig","useState","WithholdingPayPeriod","isTaxWithholdingModalOpen","setIsTaxWithholdingModalOpen","handleTaxWithholdingEditClick","useCallback","handleTaxWithholdingModalDone","config","handleTaxWithholdingModalCancel","payScheduleName","useMemo","match","s","translateValidation","key","options","schema","createTransitionCreationSchema","methods","useForm","zodResolver","onSubmit","data","response","OffCycleReason","RFCDate","payrollUuid","SDKInternalError","componentEvents","FormProvider","Form","TransitionCreationPresentation"],"mappings":"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"}
|
|
@@ -6,14 +6,12 @@ import a from "./TransitionCreationPresentation.module.scss.js";
|
|
|
6
6
|
import { useI18n as d } from "../../../i18n/I18n.js";
|
|
7
7
|
import { useComponentContext as G } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
8
|
import { Flex as t } from "../../Common/Flex/Flex.js";
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { OffCycleTaxWithholdingModal as A } from "../OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js";
|
|
16
|
-
function X({
|
|
9
|
+
import { useDateFormatter as j } from "../../../hooks/useDateFormatter.js";
|
|
10
|
+
import { RadioGroupField as F } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
11
|
+
import { OffCycleTaxWithholdingTable as L } from "../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js";
|
|
12
|
+
import { OffCycleTaxWithholdingModal as R } from "../OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js";
|
|
13
|
+
import { DatePickerField as A } from "../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
14
|
+
function Q({
|
|
17
15
|
startDate: D,
|
|
18
16
|
endDate: C,
|
|
19
17
|
payScheduleName: p,
|
|
@@ -25,7 +23,7 @@ function X({
|
|
|
25
23
|
onTaxWithholdingModalCancel: O
|
|
26
24
|
}) {
|
|
27
25
|
d("Payroll.TransitionCreation"), d("Payroll.OffCycleDeductionsSetting"), d("Payroll.OffCycleTaxWithholding");
|
|
28
|
-
const { t: i } = c("Payroll.TransitionCreation"), { t: r } = c("Payroll.OffCycleDeductionsSetting"), { t: s } = c("Payroll.OffCycleTaxWithholding"), { Heading: u, Text: l, Alert: P, Button: v } = G(), h =
|
|
26
|
+
const { t: i } = c("Payroll.TransitionCreation"), { t: r } = c("Payroll.OffCycleDeductionsSetting"), { t: s } = c("Payroll.OffCycleTaxWithholding"), { Heading: u, Text: l, Alert: P, Button: v } = G(), h = j(), S = h.formatShortWithYear(D), w = h.formatShortWithYear(C), E = b(
|
|
29
27
|
() => [
|
|
30
28
|
{
|
|
31
29
|
value: !1,
|
|
@@ -72,10 +70,10 @@ function X({
|
|
|
72
70
|
] })
|
|
73
71
|
] }),
|
|
74
72
|
/* @__PURE__ */ e("hr", { className: a.divider }),
|
|
75
|
-
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(
|
|
73
|
+
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(A, { name: "checkDate", label: i("checkDateLabel"), isRequired: !0 }) }),
|
|
76
74
|
/* @__PURE__ */ e("hr", { className: a.divider }),
|
|
77
75
|
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(
|
|
78
|
-
|
|
76
|
+
F,
|
|
79
77
|
{
|
|
80
78
|
name: "skipRegularDeductions",
|
|
81
79
|
label: r("title"),
|
|
@@ -86,7 +84,7 @@ function X({
|
|
|
86
84
|
) }),
|
|
87
85
|
/* @__PURE__ */ e("hr", { className: a.divider }),
|
|
88
86
|
/* @__PURE__ */ e(
|
|
89
|
-
|
|
87
|
+
L,
|
|
90
88
|
{
|
|
91
89
|
wageTypeGroups: W,
|
|
92
90
|
config: f,
|
|
@@ -94,7 +92,7 @@ function X({
|
|
|
94
92
|
}
|
|
95
93
|
),
|
|
96
94
|
x && /* @__PURE__ */ e(
|
|
97
|
-
|
|
95
|
+
R,
|
|
98
96
|
{
|
|
99
97
|
isOpen: !0,
|
|
100
98
|
defaultConfig: f,
|
|
@@ -106,6 +104,6 @@ function X({
|
|
|
106
104
|
] });
|
|
107
105
|
}
|
|
108
106
|
export {
|
|
109
|
-
|
|
107
|
+
Q as TransitionCreationPresentation
|
|
110
108
|
};
|
|
111
109
|
//# sourceMappingURL=TransitionCreationPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransitionCreationPresentation.js","sources":["../../../../src/components/Payroll/TransitionCreation/TransitionCreationPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { OffCycleTaxWithholdingTable } from '../OffCycleTaxWithholdingTable'\nimport { OffCycleTaxWithholdingModal } from '../OffCycleTaxWithholdingModal'\nimport {\n WAGE_TYPE_CATEGORIES,\n type WageTypeGroup,\n} from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { TransitionCreationPresentationProps } from './TransitionCreationTypes'\nimport styles from './TransitionCreationPresentation.module.scss'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex, DatePickerField, RadioGroupField } from '@/components/Common'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport function TransitionCreationPresentation({\n startDate,\n endDate,\n payScheduleName,\n isPending,\n taxWithholdingConfig,\n isTaxWithholdingModalOpen,\n onTaxWithholdingEditClick,\n onTaxWithholdingModalDone,\n onTaxWithholdingModalCancel,\n}: TransitionCreationPresentationProps) {\n useI18n('Payroll.TransitionCreation')\n useI18n('Payroll.OffCycleDeductionsSetting')\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.TransitionCreation')\n const { t: tDeductions } = useTranslation('Payroll.OffCycleDeductionsSetting')\n const { t: tWithholding } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Heading, Text, Alert, Button } = useComponentContext()\n const dateFormatter = useDateFormatter()\n\n const formattedStartDate = dateFormatter.formatShortWithYear(startDate)\n const formattedEndDate = dateFormatter.formatShortWithYear(endDate)\n\n const deductionsOptions = useMemo(\n () => [\n {\n value: false,\n label: tDeductions('options.include.label'),\n },\n {\n value: true,\n label: tDeductions('options.skip.label'),\n },\n ],\n [tDeductions],\n )\n\n const wageTypeGroups: WageTypeGroup[] = useMemo(\n () =>\n WAGE_TYPE_CATEGORIES.map(category => {\n const group: WageTypeGroup = {\n category,\n label: tWithholding(`wageTypeGroups.${category}.label`),\n }\n if (category === 'regular' || category === 'supplemental') {\n group.description = tWithholding(`wageTypeGroups.${category}.description`)\n }\n return group\n }),\n [tWithholding],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('pageTitle')}</Heading>\n <Text variant=\"supporting\">{t('pageDescription')}</Text>\n </Flex>\n\n <Alert status=\"info\" label={t('transitionExplanation')} />\n\n <hr className={styles.divider} />\n\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h3\">{t('detailsHeading')}</Heading>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Flex justifyContent=\"space-between\">\n <Text weight=\"bold\">{t('payPeriodLabel')}</Text>\n <Text>\n {formattedStartDate} - {formattedEndDate}\n </Text>\n </Flex>\n\n {payScheduleName && (\n <Flex justifyContent=\"space-between\">\n <Text weight=\"bold\">{t('payScheduleLabel')}</Text>\n <Text>{payScheduleName}</Text>\n </Flex>\n )}\n </Flex>\n </Flex>\n\n <hr className={styles.divider} />\n\n <Flex flexDirection=\"column\" gap={20}>\n <DatePickerField name=\"checkDate\" label={t('checkDateLabel')} isRequired />\n </Flex>\n\n <hr className={styles.divider} />\n\n <Flex flexDirection=\"column\" gap={20}>\n <RadioGroupField<boolean>\n name=\"skipRegularDeductions\"\n label={tDeductions('title')}\n description={tDeductions('description')}\n options={deductionsOptions}\n convertValueToString={value => String(value)}\n />\n </Flex>\n\n <hr className={styles.divider} />\n\n <OffCycleTaxWithholdingTable\n wageTypeGroups={wageTypeGroups}\n config={taxWithholdingConfig}\n onEditClick={onTaxWithholdingEditClick}\n />\n {isTaxWithholdingModalOpen && (\n <OffCycleTaxWithholdingModal\n isOpen\n defaultConfig={taxWithholdingConfig}\n onDone={onTaxWithholdingModalDone}\n onCancel={onTaxWithholdingModalCancel}\n />\n )}\n\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button type=\"submit\" isLoading={isPending} isDisabled={isPending}>\n {t('continueCta')}\n </Button>\n </Flex>\n </Flex>\n )\n}\n"],"names":["TransitionCreationPresentation","startDate","endDate","payScheduleName","isPending","taxWithholdingConfig","isTaxWithholdingModalOpen","onTaxWithholdingEditClick","onTaxWithholdingModalDone","onTaxWithholdingModalCancel","useI18n","t","useTranslation","tDeductions","tWithholding","Heading","Text","Alert","Button","useComponentContext","dateFormatter","useDateFormatter","formattedStartDate","formattedEndDate","deductionsOptions","useMemo","wageTypeGroups","WAGE_TYPE_CATEGORIES","category","group","jsxs","Flex","jsx","styles","DatePickerField","RadioGroupField","value","OffCycleTaxWithholdingTable","OffCycleTaxWithholdingModal"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransitionCreationPresentation.js","sources":["../../../../src/components/Payroll/TransitionCreation/TransitionCreationPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { OffCycleTaxWithholdingTable } from '../OffCycleTaxWithholdingTable'\nimport { OffCycleTaxWithholdingModal } from '../OffCycleTaxWithholdingModal'\nimport {\n WAGE_TYPE_CATEGORIES,\n type WageTypeGroup,\n} from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { TransitionCreationPresentationProps } from './TransitionCreationTypes'\nimport styles from './TransitionCreationPresentation.module.scss'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex, DatePickerField, RadioGroupField } from '@/components/Common'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport function TransitionCreationPresentation({\n startDate,\n endDate,\n payScheduleName,\n isPending,\n taxWithholdingConfig,\n isTaxWithholdingModalOpen,\n onTaxWithholdingEditClick,\n onTaxWithholdingModalDone,\n onTaxWithholdingModalCancel,\n}: TransitionCreationPresentationProps) {\n useI18n('Payroll.TransitionCreation')\n useI18n('Payroll.OffCycleDeductionsSetting')\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.TransitionCreation')\n const { t: tDeductions } = useTranslation('Payroll.OffCycleDeductionsSetting')\n const { t: tWithholding } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Heading, Text, Alert, Button } = useComponentContext()\n const dateFormatter = useDateFormatter()\n\n const formattedStartDate = dateFormatter.formatShortWithYear(startDate)\n const formattedEndDate = dateFormatter.formatShortWithYear(endDate)\n\n const deductionsOptions = useMemo(\n () => [\n {\n value: false,\n label: tDeductions('options.include.label'),\n },\n {\n value: true,\n label: tDeductions('options.skip.label'),\n },\n ],\n [tDeductions],\n )\n\n const wageTypeGroups: WageTypeGroup[] = useMemo(\n () =>\n WAGE_TYPE_CATEGORIES.map(category => {\n const group: WageTypeGroup = {\n category,\n label: tWithholding(`wageTypeGroups.${category}.label`),\n }\n if (category === 'regular' || category === 'supplemental') {\n group.description = tWithholding(`wageTypeGroups.${category}.description`)\n }\n return group\n }),\n [tWithholding],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('pageTitle')}</Heading>\n <Text variant=\"supporting\">{t('pageDescription')}</Text>\n </Flex>\n\n <Alert status=\"info\" label={t('transitionExplanation')} />\n\n <hr className={styles.divider} />\n\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h3\">{t('detailsHeading')}</Heading>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Flex justifyContent=\"space-between\">\n <Text weight=\"bold\">{t('payPeriodLabel')}</Text>\n <Text>\n {formattedStartDate} - {formattedEndDate}\n </Text>\n </Flex>\n\n {payScheduleName && (\n <Flex justifyContent=\"space-between\">\n <Text weight=\"bold\">{t('payScheduleLabel')}</Text>\n <Text>{payScheduleName}</Text>\n </Flex>\n )}\n </Flex>\n </Flex>\n\n <hr className={styles.divider} />\n\n <Flex flexDirection=\"column\" gap={20}>\n <DatePickerField name=\"checkDate\" label={t('checkDateLabel')} isRequired />\n </Flex>\n\n <hr className={styles.divider} />\n\n <Flex flexDirection=\"column\" gap={20}>\n <RadioGroupField<boolean>\n name=\"skipRegularDeductions\"\n label={tDeductions('title')}\n description={tDeductions('description')}\n options={deductionsOptions}\n convertValueToString={value => String(value)}\n />\n </Flex>\n\n <hr className={styles.divider} />\n\n <OffCycleTaxWithholdingTable\n wageTypeGroups={wageTypeGroups}\n config={taxWithholdingConfig}\n onEditClick={onTaxWithholdingEditClick}\n />\n {isTaxWithholdingModalOpen && (\n <OffCycleTaxWithholdingModal\n isOpen\n defaultConfig={taxWithholdingConfig}\n onDone={onTaxWithholdingModalDone}\n onCancel={onTaxWithholdingModalCancel}\n />\n )}\n\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button type=\"submit\" isLoading={isPending} isDisabled={isPending}>\n {t('continueCta')}\n </Button>\n </Flex>\n </Flex>\n )\n}\n"],"names":["TransitionCreationPresentation","startDate","endDate","payScheduleName","isPending","taxWithholdingConfig","isTaxWithholdingModalOpen","onTaxWithholdingEditClick","onTaxWithholdingModalDone","onTaxWithholdingModalCancel","useI18n","t","useTranslation","tDeductions","tWithholding","Heading","Text","Alert","Button","useComponentContext","dateFormatter","useDateFormatter","formattedStartDate","formattedEndDate","deductionsOptions","useMemo","wageTypeGroups","WAGE_TYPE_CATEGORIES","category","group","jsxs","Flex","jsx","styles","DatePickerField","RadioGroupField","value","OffCycleTaxWithholdingTable","OffCycleTaxWithholdingModal"],"mappings":"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"}
|
|
@@ -11,7 +11,7 @@ export interface TransitionCreationFormData {
|
|
|
11
11
|
checkDate: Date | null;
|
|
12
12
|
skipRegularDeductions: boolean;
|
|
13
13
|
}
|
|
14
|
-
export declare function createTransitionCreationSchema(t: (key: string) => string, minCheckDate: Date): z.ZodObject<{
|
|
14
|
+
export declare function createTransitionCreationSchema(t: (key: string, options?: Record<string, unknown>) => string, minCheckDate: Date, paymentSpeedDays?: number): z.ZodObject<{
|
|
15
15
|
checkDate: z.ZodNullable<z.ZodDate> & z.ZodType<Date, Date | null, z.core.$ZodTypeInternals<Date, Date | null>>;
|
|
16
16
|
skipRegularDeductions: z.ZodBoolean;
|
|
17
17
|
}, z.core.$strip>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as r } from "zod";
|
|
2
|
-
function
|
|
2
|
+
function i(n, a, c) {
|
|
3
3
|
return r.object({
|
|
4
4
|
checkDate: r.date().nullable().refine((e) => e !== null, {
|
|
5
5
|
message: n("errors.checkDateRequired")
|
|
@@ -7,15 +7,15 @@ function c(n, o) {
|
|
|
7
7
|
(e) => {
|
|
8
8
|
const t = new Date(e);
|
|
9
9
|
t.setHours(0, 0, 0, 0);
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const o = new Date(a);
|
|
11
|
+
return o.setHours(0, 0, 0, 0), t >= o;
|
|
12
12
|
},
|
|
13
|
-
{ message: n("errors.checkDateAchLeadTime") }
|
|
13
|
+
{ message: n("errors.checkDateAchLeadTime", { count: c ?? 2 }) }
|
|
14
14
|
),
|
|
15
15
|
skipRegularDeductions: r.boolean()
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
i as createTransitionCreationSchema
|
|
20
20
|
};
|
|
21
21
|
//# sourceMappingURL=TransitionCreationTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransitionCreationTypes.js","sources":["../../../../src/components/Payroll/TransitionCreation/TransitionCreationTypes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\n\nexport interface TransitionCreationProps extends BaseComponentInterface<'Payroll.TransitionCreation'> {\n companyId: string\n startDate: string\n endDate: string\n payScheduleUuid: string\n}\n\nexport interface TransitionCreationFormData {\n checkDate: Date | null\n skipRegularDeductions: boolean\n}\n\nexport function createTransitionCreationSchema(t: (key: string) => string
|
|
1
|
+
{"version":3,"file":"TransitionCreationTypes.js","sources":["../../../../src/components/Payroll/TransitionCreation/TransitionCreationTypes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\n\nexport interface TransitionCreationProps extends BaseComponentInterface<'Payroll.TransitionCreation'> {\n companyId: string\n startDate: string\n endDate: string\n payScheduleUuid: string\n}\n\nexport interface TransitionCreationFormData {\n checkDate: Date | null\n skipRegularDeductions: boolean\n}\n\nexport function createTransitionCreationSchema(\n t: (key: string, options?: Record<string, unknown>) => string,\n minCheckDate: Date,\n paymentSpeedDays?: number,\n) {\n return z.object({\n checkDate: z\n .date()\n .nullable()\n .refine((val): val is Date => val !== null, {\n message: t('errors.checkDateRequired'),\n })\n .refine(\n val => {\n const normalized = new Date(val)\n normalized.setHours(0, 0, 0, 0)\n const min = new Date(minCheckDate)\n min.setHours(0, 0, 0, 0)\n return normalized >= min\n },\n { message: t('errors.checkDateAchLeadTime', { count: paymentSpeedDays ?? 2 }) },\n ),\n skipRegularDeductions: z.boolean(),\n })\n}\n\nexport interface TransitionCreationPresentationProps {\n startDate: string\n endDate: string\n payScheduleName: string | null\n isPending?: boolean\n taxWithholdingConfig: OffCycleTaxWithholdingConfig\n isTaxWithholdingModalOpen: boolean\n onTaxWithholdingEditClick: () => void\n onTaxWithholdingModalDone: (config: OffCycleTaxWithholdingConfig) => void\n onTaxWithholdingModalCancel: () => void\n}\n"],"names":["createTransitionCreationSchema","t","minCheckDate","paymentSpeedDays","z","val","normalized","min"],"mappings":";AAgBO,SAASA,EACdC,GACAC,GACAC,GACA;AACA,SAAOC,EAAE,OAAO;AAAA,IACd,WAAWA,EACR,KAAA,EACA,SAAA,EACA,OAAO,CAACC,MAAqBA,MAAQ,MAAM;AAAA,MAC1C,SAASJ,EAAE,0BAA0B;AAAA,IAAA,CACtC,EACA;AAAA,MACC,CAAAI,MAAO;AACL,cAAMC,IAAa,IAAI,KAAKD,CAAG;AAC/B,QAAAC,EAAW,SAAS,GAAG,GAAG,GAAG,CAAC;AAC9B,cAAMC,IAAM,IAAI,KAAKL,CAAY;AACjC,eAAAK,EAAI,SAAS,GAAG,GAAG,GAAG,CAAC,GAChBD,KAAcC;AAAA,MACvB;AAAA,MACA,EAAE,SAASN,EAAE,+BAA+B,EAAE,OAAOE,KAAoB,GAAG,EAAA;AAAA,IAAE;AAAA,IAElF,uBAAuBC,EAAE,QAAA;AAAA,EAAQ,CAClC;AACH;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as h, useMemo as r, useCallback as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useMemo as r, useCallback as l } from "react";
|
|
3
3
|
import { usePaySchedulesGetPayPeriodsSuspense as N } from "@gusto/embedded-api/react-query/paySchedulesGetPayPeriods";
|
|
4
4
|
import { usePaySchedulesGetAllSuspense as O } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
|
|
5
|
-
import { usePayrollsSkipMutation as
|
|
6
|
-
import { PayrollType as
|
|
7
|
-
import { PayrollTypes as
|
|
5
|
+
import { usePayrollsSkipMutation as _ } from "@gusto/embedded-api/react-query/payrollsSkip";
|
|
6
|
+
import { PayrollType as v } from "@gusto/embedded-api/models/operations/postcompaniespayrollskipcompanyuuid";
|
|
7
|
+
import { PayrollTypes as L } from "@gusto/embedded-api/models/operations/getv1companiescompanyidpayperiods";
|
|
8
8
|
import { RFCDate as b } from "@gusto/embedded-api/types/rfcdate";
|
|
9
9
|
import { TransitionPayrollAlertPresentation as x } from "./TransitionPayrollAlertPresentation.js";
|
|
10
10
|
import { BaseComponent as B } from "../../Base/Base.js";
|
|
@@ -12,7 +12,7 @@ import { useBase as C } from "../../Base/useBase.js";
|
|
|
12
12
|
import { componentEvents as f } from "../../../shared/constants.js";
|
|
13
13
|
const M = 90;
|
|
14
14
|
function X(t) {
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ i(B, { onEvent: t.onEvent, children: /* @__PURE__ */ i(Y, { ...t }) });
|
|
16
16
|
}
|
|
17
17
|
function Y({ companyId: t }) {
|
|
18
18
|
const { onEvent: n, baseSubmitHandler: u } = C(), [P, c] = h(!1), [A, d] = h(null), T = r(() => {
|
|
@@ -20,9 +20,9 @@ function Y({ companyId: t }) {
|
|
|
20
20
|
return e.setDate(e.getDate() + M), new b(e);
|
|
21
21
|
}, []), { data: p } = N({
|
|
22
22
|
companyId: t,
|
|
23
|
-
payrollTypes:
|
|
23
|
+
payrollTypes: L.Transition,
|
|
24
24
|
endDate: T
|
|
25
|
-
}), { data: k } = O({ companyId: t }), m = k.
|
|
25
|
+
}), { data: k } = O({ companyId: t }), m = k.paySchedules ?? [], { mutateAsync: S } = _(), y = r(() => (p.payPeriods ?? []).filter((s) => !s.payroll?.processed), [p]), D = r(() => {
|
|
26
26
|
const e = /* @__PURE__ */ new Map();
|
|
27
27
|
for (const s of y) {
|
|
28
28
|
const a = s.payScheduleUuid ?? "unknown", o = e.get(a) ?? [];
|
|
@@ -32,7 +32,7 @@ function Y({ companyId: t }) {
|
|
|
32
32
|
const o = m.find((E) => E.uuid === s), U = o?.customName || o?.name || "Transition";
|
|
33
33
|
return { payScheduleUuid: s, payScheduleName: U, payPeriods: a };
|
|
34
34
|
});
|
|
35
|
-
}, [y, m]), R =
|
|
35
|
+
}, [y, m]), R = l(
|
|
36
36
|
(e) => {
|
|
37
37
|
n(f.RUN_TRANSITION_PAYROLL, {
|
|
38
38
|
startDate: e.startDate,
|
|
@@ -41,14 +41,14 @@ function Y({ companyId: t }) {
|
|
|
41
41
|
});
|
|
42
42
|
},
|
|
43
43
|
[n]
|
|
44
|
-
), g =
|
|
44
|
+
), g = l(
|
|
45
45
|
async (e) => {
|
|
46
46
|
d(e), await u({}, async () => {
|
|
47
47
|
await S({
|
|
48
48
|
request: {
|
|
49
49
|
companyUuid: t,
|
|
50
50
|
requestBody: {
|
|
51
|
-
payrollType:
|
|
51
|
+
payrollType: v.TransitionFromOldPaySchedule,
|
|
52
52
|
startDate: e.startDate,
|
|
53
53
|
endDate: e.endDate,
|
|
54
54
|
payScheduleUuid: e.payScheduleUuid ?? void 0
|
|
@@ -62,10 +62,10 @@ function Y({ companyId: t }) {
|
|
|
62
62
|
}), d(null);
|
|
63
63
|
},
|
|
64
64
|
[t, S, n, u]
|
|
65
|
-
), w =
|
|
65
|
+
), w = l(() => {
|
|
66
66
|
c(!1);
|
|
67
67
|
}, []);
|
|
68
|
-
return D.length === 0 ? null : /* @__PURE__ */
|
|
68
|
+
return D.length === 0 ? null : /* @__PURE__ */ i(
|
|
69
69
|
x,
|
|
70
70
|
{
|
|
71
71
|
groupedPayPeriods: D,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransitionPayrollAlert.js","sources":["../../../../src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.tsx"],"sourcesContent":["import { useMemo, useState, useCallback } from 'react'\nimport { usePaySchedulesGetPayPeriodsSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetPayPeriods'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePayrollsSkipMutation } from '@gusto/embedded-api/react-query/payrollsSkip'\nimport { PayrollType } from '@gusto/embedded-api/models/operations/postcompaniespayrollskipcompanyuuid'\nimport { PayrollTypes } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayperiods'\nimport type { PayPeriod } from '@gusto/embedded-api/models/components/payperiod'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport { TransitionPayrollAlertPresentation } from './TransitionPayrollAlertPresentation'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { componentEvents } from '@/shared/constants'\n\ninterface TransitionPayrollAlertProps {\n companyId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst LOOK_AHEAD_DAYS = 90\n\nexport function TransitionPayrollAlert(props: TransitionPayrollAlertProps) {\n return (\n <BaseComponent onEvent={props.onEvent}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId }: TransitionPayrollAlertProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n\n const [showSkipSuccessAlert, setShowSkipSuccessAlert] = useState(false)\n const [skippingPayPeriod, setSkippingPayPeriod] = useState<PayPeriod | null>(null)\n\n const lookAheadEndDate = useMemo(() => {\n const date = new Date()\n date.setDate(date.getDate() + LOOK_AHEAD_DAYS)\n return new RFCDate(date)\n }, [])\n\n const { data: payPeriodsData } = usePaySchedulesGetPayPeriodsSuspense({\n companyId,\n payrollTypes: PayrollTypes.Transition,\n endDate: lookAheadEndDate,\n })\n\n const { data: paySchedulesData } = usePaySchedulesGetAllSuspense({ companyId })\n const paySchedules = paySchedulesData.
|
|
1
|
+
{"version":3,"file":"TransitionPayrollAlert.js","sources":["../../../../src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.tsx"],"sourcesContent":["import { useMemo, useState, useCallback } from 'react'\nimport { usePaySchedulesGetPayPeriodsSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetPayPeriods'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePayrollsSkipMutation } from '@gusto/embedded-api/react-query/payrollsSkip'\nimport { PayrollType } from '@gusto/embedded-api/models/operations/postcompaniespayrollskipcompanyuuid'\nimport { PayrollTypes } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayperiods'\nimport type { PayPeriod } from '@gusto/embedded-api/models/components/payperiod'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport { TransitionPayrollAlertPresentation } from './TransitionPayrollAlertPresentation'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { componentEvents } from '@/shared/constants'\n\ninterface TransitionPayrollAlertProps {\n companyId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst LOOK_AHEAD_DAYS = 90\n\nexport function TransitionPayrollAlert(props: TransitionPayrollAlertProps) {\n return (\n <BaseComponent onEvent={props.onEvent}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId }: TransitionPayrollAlertProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n\n const [showSkipSuccessAlert, setShowSkipSuccessAlert] = useState(false)\n const [skippingPayPeriod, setSkippingPayPeriod] = useState<PayPeriod | null>(null)\n\n const lookAheadEndDate = useMemo(() => {\n const date = new Date()\n date.setDate(date.getDate() + LOOK_AHEAD_DAYS)\n return new RFCDate(date)\n }, [])\n\n const { data: payPeriodsData } = usePaySchedulesGetPayPeriodsSuspense({\n companyId,\n payrollTypes: PayrollTypes.Transition,\n endDate: lookAheadEndDate,\n })\n\n const { data: paySchedulesData } = usePaySchedulesGetAllSuspense({ companyId })\n const paySchedules = paySchedulesData.paySchedules ?? []\n\n const { mutateAsync: skipPayroll } = usePayrollsSkipMutation()\n\n const unprocessedTransitionPeriods = useMemo(() => {\n const periods = payPeriodsData.payPeriods ?? []\n return periods.filter((pp: PayPeriod) => !pp.payroll?.processed)\n }, [payPeriodsData])\n\n const groupedPayPeriods = useMemo(() => {\n const groups = new Map<string, PayPeriod[]>()\n\n for (const period of unprocessedTransitionPeriods) {\n const uuid = period.payScheduleUuid ?? 'unknown'\n const existing = groups.get(uuid) ?? []\n existing.push(period)\n groups.set(uuid, existing)\n }\n\n return Array.from(groups.entries()).map(([payScheduleUuid, payPeriods]) => {\n const schedule = paySchedules.find(s => s.uuid === payScheduleUuid)\n const payScheduleName = schedule?.customName || schedule?.name || 'Transition'\n\n return { payScheduleUuid, payScheduleName, payPeriods }\n })\n }, [unprocessedTransitionPeriods, paySchedules])\n\n const handleRunPayroll = useCallback(\n (payPeriod: PayPeriod) => {\n onEvent(componentEvents.RUN_TRANSITION_PAYROLL, {\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid,\n })\n },\n [onEvent],\n )\n\n const handleSkipPayroll = useCallback(\n async (payPeriod: PayPeriod) => {\n setSkippingPayPeriod(payPeriod)\n await baseSubmitHandler({}, async () => {\n await skipPayroll({\n request: {\n companyUuid: companyId,\n requestBody: {\n payrollType: PayrollType.TransitionFromOldPaySchedule,\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid ?? undefined,\n },\n },\n })\n setShowSkipSuccessAlert(true)\n onEvent(componentEvents.TRANSITION_PAYROLL_SKIPPED, {\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid,\n })\n })\n setSkippingPayPeriod(null)\n },\n [companyId, skipPayroll, onEvent, baseSubmitHandler],\n )\n\n const handleDismissSkipSuccessAlert = useCallback(() => {\n setShowSkipSuccessAlert(false)\n }, [])\n\n if (groupedPayPeriods.length === 0) {\n return null\n }\n\n return (\n <TransitionPayrollAlertPresentation\n groupedPayPeriods={groupedPayPeriods}\n onRunPayroll={handleRunPayroll}\n onSkipPayroll={handleSkipPayroll}\n showSkipSuccessAlert={showSkipSuccessAlert}\n onDismissSkipSuccessAlert={handleDismissSkipSuccessAlert}\n skippingPayPeriod={skippingPayPeriod}\n />\n )\n}\n"],"names":["LOOK_AHEAD_DAYS","TransitionPayrollAlert","props","jsx","BaseComponent","Root","companyId","onEvent","baseSubmitHandler","useBase","showSkipSuccessAlert","setShowSkipSuccessAlert","useState","skippingPayPeriod","setSkippingPayPeriod","lookAheadEndDate","useMemo","date","RFCDate","payPeriodsData","usePaySchedulesGetPayPeriodsSuspense","PayrollTypes","paySchedulesData","usePaySchedulesGetAllSuspense","paySchedules","skipPayroll","usePayrollsSkipMutation","unprocessedTransitionPeriods","pp","groupedPayPeriods","groups","period","uuid","existing","payScheduleUuid","payPeriods","schedule","s","payScheduleName","handleRunPayroll","useCallback","payPeriod","componentEvents","handleSkipPayroll","PayrollType","handleDismissSkipSuccessAlert","TransitionPayrollAlertPresentation"],"mappings":"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"}
|
|
@@ -2,7 +2,7 @@ import { Employee } from '@gusto/embedded-api/models/components/employee';
|
|
|
2
2
|
import { PayrollEmployeeCompensationsTypeFixedCompensations as FixedCompensations, PayrollEmployeeCompensationsType } from '@gusto/embedded-api/models/components/payrollemployeecompensationstype';
|
|
3
3
|
import { PayrollFixedCompensationTypesType } from '@gusto/embedded-api/models/components/payrollfixedcompensationtypestype';
|
|
4
4
|
import { TFunction } from 'i18next';
|
|
5
|
-
import { PayScheduleObject } from '@gusto/embedded-api/models/components/
|
|
5
|
+
import { PaySchedule as PayScheduleObject } from '@gusto/embedded-api/models/components/payschedule';
|
|
6
6
|
import { Payroll } from '@gusto/embedded-api/models/components/payroll';
|
|
7
7
|
import { PayrollType } from './PayrollList/types';
|
|
8
8
|
import { PayrollCategory } from './payrollTypes';
|