@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
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { useState as k } from "react";
|
|
3
|
+
import { useTranslation as A } from "react-i18next";
|
|
4
|
+
import { Flex as m } from "../../../Common/Flex/Flex.js";
|
|
5
|
+
import { EmptyData as S } from "../../../Common/EmptyData/EmptyData.js";
|
|
6
|
+
import { ActionsLayout as f } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
+
import { useComponentContext as T } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import { EmployeeOnboardingStatusBadge as x } from "../../../Common/OnboardingStatusBadge/index.js";
|
|
9
|
+
import s from "../../../../assets/icons/pencil.svg.js";
|
|
10
|
+
import E from "../../../../assets/icons/trashcan.svg.js";
|
|
11
|
+
import { firstLastName as P } from "../../../../helpers/formattedStrings.js";
|
|
12
|
+
import p from "../../../../assets/icons/plus-circle.svg.js";
|
|
13
|
+
import { HamburgerMenu as B } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
14
|
+
import { useDataView as j } from "../../../Common/DataView/useDataView.js";
|
|
15
|
+
import { DataView as V } from "../../../Common/DataView/DataView.js";
|
|
16
|
+
function W({
|
|
17
|
+
employees: r,
|
|
18
|
+
isFetching: g,
|
|
19
|
+
pagination: h,
|
|
20
|
+
status: C,
|
|
21
|
+
onEdit: b,
|
|
22
|
+
onDelete: D,
|
|
23
|
+
onCancelSelfOnboarding: v,
|
|
24
|
+
onReview: w,
|
|
25
|
+
onAddEmployee: d,
|
|
26
|
+
onSkip: u
|
|
27
|
+
}) {
|
|
28
|
+
const { t } = A("Employee.EmployeeList"), n = T(), [l, c] = k(null), { ...y } = j({
|
|
29
|
+
data: r,
|
|
30
|
+
columns: [
|
|
31
|
+
{
|
|
32
|
+
key: "name",
|
|
33
|
+
title: t("nameLabel"),
|
|
34
|
+
render: (i) => P({
|
|
35
|
+
first_name: i.firstName,
|
|
36
|
+
last_name: i.lastName
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "status",
|
|
41
|
+
title: t("statusLabel"),
|
|
42
|
+
render: (i) => /* @__PURE__ */ e(
|
|
43
|
+
x,
|
|
44
|
+
{
|
|
45
|
+
onboarded: i.onboarded,
|
|
46
|
+
onboardingStatus: i.onboardingStatus
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
itemMenu: (i) => {
|
|
52
|
+
const a = [];
|
|
53
|
+
return i.allowedActions.includes("edit") && a.push({
|
|
54
|
+
label: t("editCta"),
|
|
55
|
+
onClick: () => {
|
|
56
|
+
b(i.uuid, i.onboardingStatus ?? void 0);
|
|
57
|
+
},
|
|
58
|
+
icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
|
|
59
|
+
}), i.allowedActions.includes("cancel_self_onboarding") && a.push({
|
|
60
|
+
label: t("cancelSelfOnboardingCta"),
|
|
61
|
+
onClick: () => {
|
|
62
|
+
v(i.uuid);
|
|
63
|
+
},
|
|
64
|
+
icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
|
|
65
|
+
}), i.allowedActions.includes("review") && a.push({
|
|
66
|
+
label: t("reviewCta"),
|
|
67
|
+
onClick: () => {
|
|
68
|
+
w(i.uuid);
|
|
69
|
+
},
|
|
70
|
+
icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
|
|
71
|
+
}), i.allowedActions.includes("delete") && a.push({
|
|
72
|
+
label: t("deleteCta"),
|
|
73
|
+
onClick: () => {
|
|
74
|
+
c(i.uuid);
|
|
75
|
+
},
|
|
76
|
+
icon: /* @__PURE__ */ e(E, { "aria-hidden": !0 })
|
|
77
|
+
}), /* @__PURE__ */ e(B, { items: a, triggerLabel: t("hamburgerTitle") });
|
|
78
|
+
},
|
|
79
|
+
isFetching: g,
|
|
80
|
+
pagination: h,
|
|
81
|
+
emptyState: () => /* @__PURE__ */ e(S, { title: t("emptyTableTitle"), description: t("emptyTableDescription"), children: /* @__PURE__ */ o(f, { justifyContent: "center", children: [
|
|
82
|
+
/* @__PURE__ */ e(n.Button, { variant: "secondary", onClick: u, children: t("skipCta") }),
|
|
83
|
+
/* @__PURE__ */ e(n.Button, { variant: "primary", onClick: d, icon: /* @__PURE__ */ e(p, {}), children: t("addEmployeeCta") })
|
|
84
|
+
] }) })
|
|
85
|
+
});
|
|
86
|
+
return /* @__PURE__ */ o(L, { children: [
|
|
87
|
+
/* @__PURE__ */ o(m, { flexDirection: "column", gap: 24, children: [
|
|
88
|
+
/* @__PURE__ */ o(m, { justifyContent: "space-between", alignItems: "center", children: [
|
|
89
|
+
/* @__PURE__ */ e(n.Heading, { as: "h2", children: t("title") }),
|
|
90
|
+
r.length > 0 && /* @__PURE__ */ e(
|
|
91
|
+
n.Button,
|
|
92
|
+
{
|
|
93
|
+
variant: "secondary",
|
|
94
|
+
onClick: d,
|
|
95
|
+
icon: /* @__PURE__ */ e(p, {}),
|
|
96
|
+
children: t("addAnotherCta")
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] }),
|
|
100
|
+
/* @__PURE__ */ e(V, { label: t("employeeListLabel"), ...y }),
|
|
101
|
+
r.length > 0 && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(n.Button, { onClick: u, children: t("continueCta") }) })
|
|
102
|
+
] }),
|
|
103
|
+
/* @__PURE__ */ e(
|
|
104
|
+
n.Dialog,
|
|
105
|
+
{
|
|
106
|
+
isOpen: !!l,
|
|
107
|
+
onClose: () => {
|
|
108
|
+
c(null);
|
|
109
|
+
},
|
|
110
|
+
onPrimaryActionClick: async () => {
|
|
111
|
+
if (l)
|
|
112
|
+
try {
|
|
113
|
+
await D(l), c(null);
|
|
114
|
+
} catch {
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
isPrimaryActionLoading: C.isPending,
|
|
118
|
+
isDestructive: !0,
|
|
119
|
+
title: t("deleteDialog.title"),
|
|
120
|
+
primaryActionLabel: t("deleteDialog.confirmCta"),
|
|
121
|
+
closeActionLabel: t("deleteDialog.cancelCta"),
|
|
122
|
+
children: t("deleteDialog.description")
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
] });
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
W as EmployeeListView
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=EmployeeListView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmployeeListView.js","sources":["../../../../../src/components/Employee/employee-list/onboarding/EmployeeListView.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport type { UseEmployeeListResult, EmployeeWithActions } from '../shared/useEmployeeList'\nimport { DataView, EmptyData, ActionsLayout, useDataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { EmployeeOnboardingStatusBadge } from '@/components/Common/OnboardingStatusBadge'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { firstLastName } from '@/helpers/formattedStrings'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\nexport interface EmployeeListViewProps extends Pick<\n Extract<UseEmployeeListResult, { isLoading: false }>,\n 'pagination' | 'status'\n> {\n employees: EmployeeWithActions[]\n isFetching: boolean\n onEdit: (employeeId: string, onboardingStatus?: OnboardingStatus) => void\n onDelete: (employeeId: string) => Promise<void>\n onCancelSelfOnboarding: (employeeId: string) => Promise<void>\n onReview: (employeeId: string) => Promise<void>\n onAddEmployee: () => void\n onSkip: () => void\n}\n\nexport function EmployeeListView({\n employees,\n isFetching,\n pagination,\n status,\n onEdit,\n onDelete,\n onCancelSelfOnboarding,\n onReview,\n onAddEmployee,\n onSkip,\n}: EmployeeListViewProps) {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n const [employeeToDelete, setEmployeeToDelete] = useState<string | null>(null)\n\n const { ...dataViewProps } = useDataView({\n data: employees,\n columns: [\n {\n key: 'name',\n title: t('nameLabel'),\n render: (employee: EmployeeWithActions) => {\n return firstLastName({\n first_name: employee.firstName,\n last_name: employee.lastName,\n })\n },\n },\n {\n key: 'status',\n title: t('statusLabel'),\n render: (employee: EmployeeWithActions) => (\n <EmployeeOnboardingStatusBadge\n onboarded={employee.onboarded}\n onboardingStatus={employee.onboardingStatus}\n />\n ),\n },\n ],\n itemMenu: employee => {\n const menuItems = []\n\n if (employee.allowedActions.includes('edit')) {\n menuItems.push({\n label: t('editCta'),\n onClick: () => {\n onEdit(employee.uuid, employee.onboardingStatus ?? undefined)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n if (employee.allowedActions.includes('cancel_self_onboarding')) {\n menuItems.push({\n label: t('cancelSelfOnboardingCta'),\n onClick: () => {\n void onCancelSelfOnboarding(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n if (employee.allowedActions.includes('review')) {\n menuItems.push({\n label: t('reviewCta'),\n onClick: () => {\n void onReview(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n if (employee.allowedActions.includes('delete')) {\n menuItems.push({\n label: t('deleteCta'),\n onClick: () => {\n setEmployeeToDelete(employee.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n })\n }\n\n return <HamburgerMenu items={menuItems} triggerLabel={t('hamburgerTitle')} />\n },\n isFetching,\n pagination,\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button variant=\"secondary\" onClick={onSkip}>\n {t('skipCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" onClick={onAddEmployee} icon={<PlusCircleIcon />}>\n {t('addEmployeeCta')}\n </Components.Button>\n </ActionsLayout>\n </EmptyData>\n ),\n })\n\n return (\n <>\n <Flex flexDirection=\"column\" gap={24}>\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n\n {employees.length > 0 && (\n <Components.Button\n variant=\"secondary\"\n onClick={onAddEmployee}\n icon={<PlusCircleIcon />}\n >\n {t('addAnotherCta')}\n </Components.Button>\n )}\n </Flex>\n\n <DataView label={t('employeeListLabel')} {...dataViewProps} />\n\n {employees.length > 0 && (\n <ActionsLayout>\n <Components.Button onClick={onSkip}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )}\n </Flex>\n\n <Components.Dialog\n isOpen={!!employeeToDelete}\n onClose={() => {\n setEmployeeToDelete(null)\n }}\n onPrimaryActionClick={async () => {\n if (employeeToDelete) {\n try {\n await onDelete(employeeToDelete)\n setEmployeeToDelete(null)\n } catch {\n // Keep dialog open on error\n }\n }\n }}\n isPrimaryActionLoading={status.isPending}\n isDestructive\n title={t('deleteDialog.title')}\n primaryActionLabel={t('deleteDialog.confirmCta')}\n closeActionLabel={t('deleteDialog.cancelCta')}\n >\n {t('deleteDialog.description')}\n </Components.Dialog>\n </>\n )\n}\n"],"names":["EmployeeListView","employees","isFetching","pagination","status","onEdit","onDelete","onCancelSelfOnboarding","onReview","onAddEmployee","onSkip","useTranslation","Components","useComponentContext","employeeToDelete","setEmployeeToDelete","useState","dataViewProps","useDataView","employee","firstLastName","jsx","EmployeeOnboardingStatusBadge","menuItems","PencilSvg","TrashCanSvg","HamburgerMenu","EmptyData","jsxs","ActionsLayout","PlusCircleIcon","Fragment","Flex","DataView"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Employee } from '@gusto/embedded-api/models/components/employee';
|
|
2
2
|
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
3
|
-
import { PaginationControlProps } from '
|
|
4
|
-
import { HookLoadingResult, HookSubmitResult, BaseHookReady } from '
|
|
3
|
+
import { PaginationControlProps } from '../../../Common/PaginationControl/PaginationControlTypes';
|
|
4
|
+
import { HookLoadingResult, HookSubmitResult, BaseHookReady } from '../../../../partner-hook-utils/types';
|
|
5
5
|
export type EmployeeAction = 'edit' | 'delete' | 'cancel_self_onboarding' | 'review' | 'dismiss' | 'rehire';
|
|
6
6
|
export interface EmployeeWithActions extends Employee {
|
|
7
7
|
allowedActions: EmployeeAction[];
|
|
@@ -17,15 +17,13 @@ export interface UseEmployeeListProps {
|
|
|
17
17
|
companyId: string;
|
|
18
18
|
employeeType?: EmployeeType;
|
|
19
19
|
}
|
|
20
|
-
interface UseEmployeeListReady extends
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
interface UseEmployeeListReady extends BaseHookReady<{
|
|
21
|
+
employees: EmployeeWithActions[];
|
|
22
|
+
}, {
|
|
23
|
+
isFetching: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
}> {
|
|
24
26
|
pagination: PaginationControlProps;
|
|
25
|
-
status: {
|
|
26
|
-
isFetching: boolean;
|
|
27
|
-
isPending: boolean;
|
|
28
|
-
};
|
|
29
27
|
actions: {
|
|
30
28
|
onDelete: (employeeId: string, callbacks?: EmployeeActionCallbacks) => Promise<HookSubmitResult<void> | undefined>;
|
|
31
29
|
onReview: (employeeId: string, callbacks?: EmployeeActionCallbacks) => Promise<HookSubmitResult<string> | undefined>;
|
|
@@ -3,26 +3,26 @@ import { useEmployeesList as M } from "@gusto/embedded-api/react-query/employees
|
|
|
3
3
|
import { useEmployeesDeleteMutation as w } from "@gusto/embedded-api/react-query/employeesDelete";
|
|
4
4
|
import { useEmployeesUpdateOnboardingStatusMutation as R } from "@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus";
|
|
5
5
|
import { keepPreviousData as y } from "@tanstack/react-query";
|
|
6
|
-
import { usePagination as B } from "
|
|
7
|
-
import { useBaseSubmit as v } from "
|
|
8
|
-
import {
|
|
9
|
-
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as C } from "
|
|
10
|
-
function q(e,
|
|
6
|
+
import { usePagination as B } from "../../../../hooks/usePagination/usePagination.js";
|
|
7
|
+
import { useBaseSubmit as v } from "../../../Base/useBaseSubmit.js";
|
|
8
|
+
import { composeErrorHandler as G } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
9
|
+
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as C } from "../../../../shared/constants.js";
|
|
10
|
+
function q(e, o) {
|
|
11
11
|
const a = [];
|
|
12
|
-
return
|
|
13
|
-
C.has(e.onboardingStatus) && a.push("cancel_self_onboarding"), e.onboardingStatus === i.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE && a.push("review"), e.onboarded || a.push("delete"),
|
|
12
|
+
return o !== "terminated" && (e.onboardingStatus === i.ADMIN_ONBOARDING_INCOMPLETE || e.onboardingStatus === i.SELF_ONBOARDING_PENDING_INVITE || e.onboardingStatus === i.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW || e.onboardingStatus === i.ONBOARDING_COMPLETED) && a.push("edit"), e.onboardingStatus && // @ts-expect-error: onboardingStatus during runtime can be one of self onboarding statuses
|
|
13
|
+
C.has(e.onboardingStatus) && a.push("cancel_self_onboarding"), e.onboardingStatus === i.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE && a.push("review"), e.onboarded || a.push("delete"), o === "active" && a.push("dismiss"), o === "terminated" && a.push("rehire"), a;
|
|
14
14
|
}
|
|
15
15
|
function Q({
|
|
16
16
|
companyId: e,
|
|
17
|
-
employeeType:
|
|
17
|
+
employeeType: o
|
|
18
18
|
}) {
|
|
19
|
-
const { currentPage: a, itemsPerPage: l, getPaginationProps: O } = B(),
|
|
19
|
+
const { currentPage: a, itemsPerPage: l, getPaginationProps: O } = B(), S = P(() => {
|
|
20
20
|
const t = {
|
|
21
21
|
companyId: e,
|
|
22
22
|
page: a,
|
|
23
23
|
per: l
|
|
24
24
|
};
|
|
25
|
-
switch (
|
|
25
|
+
switch (o) {
|
|
26
26
|
case "active":
|
|
27
27
|
return { ...t, onboardedActive: !0 };
|
|
28
28
|
case "onboarding":
|
|
@@ -32,14 +32,18 @@ function Q({
|
|
|
32
32
|
default:
|
|
33
33
|
return t;
|
|
34
34
|
}
|
|
35
|
-
}, [e, a, l,
|
|
35
|
+
}, [e, a, l, o]), b = M(S, { placeholderData: y }), E = w(), d = R(), {
|
|
36
|
+
baseSubmitHandler: c,
|
|
37
|
+
error: f,
|
|
38
|
+
setError: N
|
|
39
|
+
} = v("EmployeeList"), p = G([b], { submitError: f, setSubmitError: N }), I = E.isPending || d.isPending, { data: u, isFetching: m } = b, h = P(() => (u?.showEmployees ?? []).map((t) => {
|
|
36
40
|
const r = t.jobs?.find((n) => n.primary === !0);
|
|
37
41
|
return {
|
|
38
42
|
...t,
|
|
39
|
-
allowedActions: q(t,
|
|
43
|
+
allowedActions: q(t, o),
|
|
40
44
|
primaryJob: r
|
|
41
45
|
};
|
|
42
|
-
}), [u?.showEmployees,
|
|
46
|
+
}), [u?.showEmployees, o]), A = u?.httpMeta.response.headers ? O(u.httpMeta.response.headers, m) : {
|
|
43
47
|
handleNextPage: () => {
|
|
44
48
|
},
|
|
45
49
|
handleFirstPage: () => {
|
|
@@ -56,48 +60,48 @@ function Q({
|
|
|
56
60
|
itemsPerPage: 5
|
|
57
61
|
}, _ = async (t, r) => {
|
|
58
62
|
let n;
|
|
59
|
-
return await c(t, async (
|
|
63
|
+
return await c(t, async (s) => {
|
|
60
64
|
await E.mutateAsync({
|
|
61
|
-
request: { employeeId:
|
|
62
|
-
}), r?.onDelete?.(
|
|
65
|
+
request: { employeeId: s }
|
|
66
|
+
}), r?.onDelete?.(s), n = {
|
|
63
67
|
mode: "update",
|
|
64
68
|
data: void 0
|
|
65
69
|
};
|
|
66
70
|
}), n;
|
|
67
71
|
}, D = async (t, r) => {
|
|
68
72
|
let n;
|
|
69
|
-
return await c(t, async (
|
|
70
|
-
const
|
|
73
|
+
return await c(t, async (s) => {
|
|
74
|
+
const g = await d.mutateAsync({
|
|
71
75
|
request: {
|
|
72
|
-
employeeId:
|
|
76
|
+
employeeId: s,
|
|
73
77
|
requestBody: {
|
|
74
78
|
onboardingStatus: i.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
});
|
|
78
|
-
r?.onReview?.(
|
|
82
|
+
r?.onReview?.(s), n = {
|
|
79
83
|
mode: "update",
|
|
80
|
-
data:
|
|
84
|
+
data: g.employeeOnboardingStatus?.onboardingStatus ?? ""
|
|
81
85
|
};
|
|
82
86
|
}), n;
|
|
83
87
|
}, L = async (t, r) => {
|
|
84
88
|
let n;
|
|
85
|
-
return await c(t, async (
|
|
86
|
-
const
|
|
89
|
+
return await c(t, async (s) => {
|
|
90
|
+
const g = await d.mutateAsync({
|
|
87
91
|
request: {
|
|
88
|
-
employeeId:
|
|
92
|
+
employeeId: s,
|
|
89
93
|
requestBody: {
|
|
90
94
|
onboardingStatus: i.ADMIN_ONBOARDING_INCOMPLETE
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
});
|
|
94
|
-
r?.onCancelSelfOnboarding?.(
|
|
98
|
+
r?.onCancelSelfOnboarding?.(s), n = {
|
|
95
99
|
mode: "update",
|
|
96
|
-
data:
|
|
100
|
+
data: g.employeeOnboardingStatus?.onboardingStatus ?? ""
|
|
97
101
|
};
|
|
98
102
|
}), n;
|
|
99
103
|
};
|
|
100
|
-
return !u &&
|
|
104
|
+
return !u && m ? {
|
|
101
105
|
isLoading: !0,
|
|
102
106
|
errorHandling: p
|
|
103
107
|
} : {
|
|
@@ -106,7 +110,7 @@ function Q({
|
|
|
106
110
|
employees: h
|
|
107
111
|
},
|
|
108
112
|
pagination: A,
|
|
109
|
-
status: { isFetching:
|
|
113
|
+
status: { isFetching: m, isPending: I },
|
|
110
114
|
actions: { onDelete: _, onReview: D, onCancelSelfOnboarding: L },
|
|
111
115
|
errorHandling: p
|
|
112
116
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEmployeeList.js","sources":["../../../../../src/components/Employee/employee-list/shared/useEmployeeList.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { keepPreviousData } from '@tanstack/react-query'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { EmployeeOnboardingStatus, EmployeeSelfOnboardingStatuses } from '@/shared/constants'\nimport type { HookLoadingResult, HookSubmitResult, BaseHookReady } from '@/partner-hook-utils/types'\n\nexport type EmployeeAction =\n | 'edit'\n | 'delete'\n | 'cancel_self_onboarding'\n | 'review'\n | 'dismiss'\n | 'rehire'\n\nexport interface EmployeeWithActions extends Employee {\n allowedActions: EmployeeAction[]\n primaryJob?: Job\n}\n\nexport interface EmployeeActionCallbacks {\n onDelete?: (employeeId: string) => void\n onReview?: (employeeId: string) => void\n onCancelSelfOnboarding?: (employeeId: string) => void\n}\n\nexport type EmployeeType = 'active' | 'onboarding' | 'terminated'\n\nexport interface UseEmployeeListProps {\n companyId: string\n employeeType?: EmployeeType\n}\n\ninterface UseEmployeeListReady extends BaseHookReady<\n { employees: EmployeeWithActions[] },\n { isFetching: boolean; isPending: boolean }\n> {\n pagination: PaginationControlProps\n actions: {\n onDelete: (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ) => Promise<HookSubmitResult<void> | undefined>\n onReview: (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ) => Promise<HookSubmitResult<string> | undefined>\n onCancelSelfOnboarding: (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ) => Promise<HookSubmitResult<string> | undefined>\n }\n}\n\nexport type UseEmployeeListResult = HookLoadingResult | UseEmployeeListReady\n\nfunction deriveAllowedActions(employee: Employee, employeeType?: EmployeeType): EmployeeAction[] {\n const actions: EmployeeAction[] = []\n\n // Edit action - available for certain onboarding statuses, but not for terminated employees\n if (\n employeeType !== 'terminated' &&\n (employee.onboardingStatus === EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE ||\n employee.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW ||\n employee.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED)\n ) {\n actions.push('edit')\n }\n\n // Cancel self onboarding - available for employees in self-onboarding flow\n if (\n employee.onboardingStatus &&\n // @ts-expect-error: onboardingStatus during runtime can be one of self onboarding statuses\n EmployeeSelfOnboardingStatuses.has(employee.onboardingStatus)\n ) {\n actions.push('cancel_self_onboarding')\n }\n\n // Review action - available when employee completed self-onboarding\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE\n ) {\n actions.push('review')\n }\n\n // Delete action - available for non-onboarded employees\n if (!employee.onboarded) {\n actions.push('delete')\n }\n\n // Tab-specific actions for ManagementEmployeeList\n if (employeeType === 'active') {\n actions.push('dismiss')\n }\n\n if (employeeType === 'terminated') {\n actions.push('rehire')\n }\n\n return actions\n}\n\nexport function useEmployeeList({\n companyId,\n employeeType,\n}: UseEmployeeListProps): UseEmployeeListResult {\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const queryParams = useMemo(() => {\n const baseParams = {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n }\n\n switch (employeeType) {\n case 'active':\n return { ...baseParams, onboardedActive: true }\n case 'onboarding':\n return { ...baseParams, onboarded: false }\n case 'terminated':\n return { ...baseParams, terminated: true }\n default:\n return baseParams\n }\n }, [companyId, currentPage, itemsPerPage, employeeType])\n\n const employeesQuery = useEmployeesList(queryParams, { placeholderData: keepPreviousData })\n\n const deleteEmployeeMutation = useEmployeesDeleteMutation()\n const updateOnboardingStatusMutation = useEmployeesUpdateOnboardingStatusMutation()\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('EmployeeList')\n\n const errorHandling = composeErrorHandler([employeesQuery], { submitError, setSubmitError })\n\n const isPending = deleteEmployeeMutation.isPending || updateOnboardingStatusMutation.isPending\n\n const { data, isFetching } = employeesQuery\n\n const employees = useMemo<EmployeeWithActions[]>(() => {\n return (data?.showEmployees ?? []).map(employee => {\n const primaryJob = employee.jobs?.find(job => job.primary === true)\n\n return {\n ...employee,\n allowedActions: deriveAllowedActions(employee, employeeType),\n primaryJob,\n }\n })\n }, [data?.showEmployees, employeeType])\n\n const paginationProps = data?.httpMeta.response.headers\n ? getPaginationProps(data.httpMeta.response.headers, isFetching)\n : {\n handleNextPage: () => {},\n handleFirstPage: () => {},\n handleLastPage: () => {},\n handlePreviousPage: () => {},\n handleItemsPerPageChange: () => {},\n currentPage: 1,\n totalPages: 1,\n totalCount: 0,\n itemsPerPage: 5 as const,\n }\n\n const onDelete = async (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ): Promise<HookSubmitResult<void> | undefined> => {\n let submitResult: HookSubmitResult<void> | undefined\n\n await baseSubmitHandler(employeeId, async id => {\n await deleteEmployeeMutation.mutateAsync({\n request: { employeeId: id },\n })\n callbacks?.onDelete?.(id)\n\n submitResult = {\n mode: 'update',\n data: undefined,\n }\n })\n\n return submitResult\n }\n\n const onReview = async (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ): Promise<HookSubmitResult<string> | undefined> => {\n let submitResult: HookSubmitResult<string> | undefined\n\n await baseSubmitHandler(employeeId, async id => {\n const result = await updateOnboardingStatusMutation.mutateAsync({\n request: {\n employeeId: id,\n requestBody: {\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n },\n },\n })\n callbacks?.onReview?.(id)\n\n submitResult = {\n mode: 'update',\n data: result.employeeOnboardingStatus?.onboardingStatus ?? '',\n }\n })\n\n return submitResult\n }\n\n const onCancelSelfOnboarding = async (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ): Promise<HookSubmitResult<string> | undefined> => {\n let submitResult: HookSubmitResult<string> | undefined\n\n await baseSubmitHandler(employeeId, async id => {\n const result = await updateOnboardingStatusMutation.mutateAsync({\n request: {\n employeeId: id,\n requestBody: {\n onboardingStatus: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n },\n },\n })\n callbacks?.onCancelSelfOnboarding?.(id)\n\n submitResult = {\n mode: 'update',\n data: result.employeeOnboardingStatus?.onboardingStatus ?? '',\n }\n })\n\n return submitResult\n }\n\n const isLoading = !data && isFetching\n\n if (isLoading) {\n return {\n isLoading: true,\n errorHandling,\n }\n }\n\n return {\n isLoading: false,\n data: {\n employees,\n },\n pagination: paginationProps,\n status: { isFetching, isPending },\n actions: { onDelete, onReview, onCancelSelfOnboarding },\n errorHandling,\n }\n}\n"],"names":["deriveAllowedActions","employee","employeeType","actions","EmployeeOnboardingStatus","EmployeeSelfOnboardingStatuses","useEmployeeList","companyId","currentPage","itemsPerPage","getPaginationProps","usePagination","queryParams","useMemo","baseParams","employeesQuery","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","isPending","data","isFetching","employees","primaryJob","job","paginationProps","onDelete","employeeId","callbacks","submitResult","id","onReview","result","onCancelSelfOnboarding"],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ManagementEmployeeList as EmployeeList } from '../employee-list/management/ManagementEmployeeList';
|
|
2
|
+
export { EmployeeDocuments } from '../EmployeeDocuments';
|
|
3
|
+
export { DashboardFlow } from '../Dashboard';
|
|
4
|
+
export { TerminateEmployee } from '../Terminations/TerminateEmployee/TerminateEmployee';
|
|
5
|
+
export { TerminationSummary } from '../Terminations/TerminationSummary/TerminationSummary';
|
|
6
|
+
export { TerminationFlow } from '../Terminations/TerminationFlow/TerminationFlow';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ManagementEmployeeList as m } from "../employee-list/management/ManagementEmployeeList.js";
|
|
2
|
+
import { TerminateEmployee as t } from "../Terminations/TerminateEmployee/TerminateEmployee.js";
|
|
3
|
+
import { TerminationSummary as a } from "../Terminations/TerminationSummary/TerminationSummary.js";
|
|
4
|
+
import { TerminationFlow as i } from "../Terminations/TerminationFlow/TerminationFlow.js";
|
|
5
|
+
import { DashboardFlow as l } from "../Dashboard/DashboardFlow.js";
|
|
6
|
+
import { EmployeeDocuments as s } from "../EmployeeDocuments/EmployeeDocuments.js";
|
|
7
|
+
export {
|
|
8
|
+
l as DashboardFlow,
|
|
9
|
+
s as EmployeeDocuments,
|
|
10
|
+
m as EmployeeList,
|
|
11
|
+
t as TerminateEmployee,
|
|
12
|
+
i as TerminationFlow,
|
|
13
|
+
a as TerminationSummary
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=employeeManagement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"employeeManagement.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { OnboardingFlow } from '../OnboardingFlow/OnboardingFlow';
|
|
2
|
+
export { SelfOnboardingFlow } from '../SelfOnboardingFlow/SelfOnboardingFlow';
|
|
3
|
+
export { EmployeeList } from '../employee-list/onboarding/EmployeeList';
|
|
4
|
+
export { OnboardingSummary } from '../OnboardingSummary';
|
|
5
|
+
export { Landing } from '../Landing';
|
|
6
|
+
export { DocumentSigner } from '../DocumentSigner';
|
|
7
|
+
export { EmploymentEligibility } from '../DocumentSigner/EmploymentEligibility';
|
|
8
|
+
export { Profile } from '../Profile';
|
|
9
|
+
export { Compensation } from '../Compensation';
|
|
10
|
+
export { FederalTaxes } from '../FederalTaxes';
|
|
11
|
+
export { StateTaxes } from '../StateTaxes';
|
|
12
|
+
export { Deductions } from '../Deductions';
|
|
13
|
+
export { PaymentMethod } from '../PaymentMethod';
|
|
14
|
+
export { Taxes } from '../Taxes';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OnboardingFlow as e } from "../OnboardingFlow/OnboardingFlow.js";
|
|
2
|
+
import { SelfOnboardingFlow as m } from "../SelfOnboardingFlow/SelfOnboardingFlow.js";
|
|
3
|
+
import { EmployeeList as x } from "../employee-list/onboarding/EmployeeList.js";
|
|
4
|
+
import { Compensation as n } from "../Compensation/Compensation.js";
|
|
5
|
+
import { Deductions as a } from "../Deductions/Deductions.js";
|
|
6
|
+
import { DocumentSigner as d } from "../DocumentSigner/DocumentSigner.js";
|
|
7
|
+
import { EmploymentEligibility as s } from "../DocumentSigner/EmploymentEligibility/EmploymentEligibility.js";
|
|
8
|
+
import { FederalTaxes as b } from "../FederalTaxes/FederalTaxes.js";
|
|
9
|
+
import { Landing as u } from "../Landing/Landing.js";
|
|
10
|
+
import { OnboardingSummary as F } from "../OnboardingSummary/OnboardingSummary.js";
|
|
11
|
+
import { PaymentMethod as T } from "../PaymentMethod/PaymentMethod.js";
|
|
12
|
+
import { Profile as w } from "../Profile/Profile.js";
|
|
13
|
+
import { StateTaxes as L } from "../StateTaxes/StateTaxes.js";
|
|
14
|
+
import { Taxes as h } from "../Taxes/Taxes.js";
|
|
15
|
+
export {
|
|
16
|
+
n as Compensation,
|
|
17
|
+
a as Deductions,
|
|
18
|
+
d as DocumentSigner,
|
|
19
|
+
x as EmployeeList,
|
|
20
|
+
s as EmploymentEligibility,
|
|
21
|
+
b as FederalTaxes,
|
|
22
|
+
u as Landing,
|
|
23
|
+
e as OnboardingFlow,
|
|
24
|
+
F as OnboardingSummary,
|
|
25
|
+
T as PaymentMethod,
|
|
26
|
+
w as Profile,
|
|
27
|
+
m as SelfOnboardingFlow,
|
|
28
|
+
L as StateTaxes,
|
|
29
|
+
h as Taxes
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=employeeOnboarding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"employeeOnboarding.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
|
-
export { EmployeeList } from './
|
|
3
|
-
export { ManagementEmployeeList } from './EmployeeList/ManagementEmployeeList';
|
|
2
|
+
export { EmployeeList } from './employee-list/onboarding/EmployeeList';
|
|
4
3
|
export { Deductions } from './Deductions';
|
|
5
4
|
export { OnboardingSummary } from './OnboardingSummary';
|
|
6
5
|
export { Profile } from './Profile';
|
|
@@ -13,6 +12,8 @@ export { DocumentSigner } from './DocumentSigner';
|
|
|
13
12
|
export { OnboardingFlow } from './OnboardingFlow/OnboardingFlow';
|
|
14
13
|
export { SelfOnboardingFlow } from './SelfOnboardingFlow/SelfOnboardingFlow';
|
|
15
14
|
export { EmployeeDocuments } from './EmployeeDocuments';
|
|
15
|
+
export { DashboardFlow } from './Dashboard';
|
|
16
|
+
export type { DashboardFlowProps } from './Dashboard';
|
|
16
17
|
export { EmploymentEligibility } from './DocumentSigner/EmploymentEligibility';
|
|
17
18
|
export type { EmploymentEligibilityProps } from './DocumentSigner/EmploymentEligibility';
|
|
18
19
|
export { TerminateEmployee } from './Terminations/TerminateEmployee/TerminateEmployee';
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { EmployeeList as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { TerminationSummary as y } from "./Terminations/TerminationSummary/TerminationSummary.js";
|
|
1
|
+
import { EmployeeList as e } from "./employee-list/onboarding/EmployeeList.js";
|
|
2
|
+
import { OnboardingFlow as t } from "./OnboardingFlow/OnboardingFlow.js";
|
|
3
|
+
import { SelfOnboardingFlow as x } from "./SelfOnboardingFlow/SelfOnboardingFlow.js";
|
|
4
|
+
import { TerminateEmployee as n } from "./Terminations/TerminateEmployee/TerminateEmployee.js";
|
|
5
|
+
import { TerminationSummary as i } from "./Terminations/TerminationSummary/TerminationSummary.js";
|
|
7
6
|
import { TerminationFlow as d } from "./Terminations/TerminationFlow/TerminationFlow.js";
|
|
8
|
-
import { Compensation as
|
|
7
|
+
import { Compensation as y } from "./Compensation/Compensation.js";
|
|
8
|
+
import { DashboardFlow as T } from "./Dashboard/DashboardFlow.js";
|
|
9
9
|
import { Deductions as u } from "./Deductions/Deductions.js";
|
|
10
|
-
import { DocumentSigner as
|
|
11
|
-
import { EmployeeDocuments as
|
|
12
|
-
import { EmploymentEligibility as
|
|
13
|
-
import { FederalTaxes as
|
|
10
|
+
import { DocumentSigner as F } from "./DocumentSigner/DocumentSigner.js";
|
|
11
|
+
import { EmployeeDocuments as w } from "./EmployeeDocuments/EmployeeDocuments.js";
|
|
12
|
+
import { EmploymentEligibility as c } from "./DocumentSigner/EmploymentEligibility/EmploymentEligibility.js";
|
|
13
|
+
import { FederalTaxes as h } from "./FederalTaxes/FederalTaxes.js";
|
|
14
14
|
import { Landing as P } from "./Landing/Landing.js";
|
|
15
|
-
import { OnboardingSummary as
|
|
15
|
+
import { OnboardingSummary as M } from "./OnboardingSummary/OnboardingSummary.js";
|
|
16
16
|
import { PaymentMethod as k } from "./PaymentMethod/PaymentMethod.js";
|
|
17
17
|
import { Profile as v } from "./Profile/Profile.js";
|
|
18
18
|
import { StateTaxes as A } from "./StateTaxes/StateTaxes.js";
|
|
19
19
|
import { Taxes as G } from "./Taxes/Taxes.js";
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
y as Compensation,
|
|
22
|
+
T as DashboardFlow,
|
|
22
23
|
u as Deductions,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
F as DocumentSigner,
|
|
25
|
+
w as EmployeeDocuments,
|
|
26
|
+
e as EmployeeList,
|
|
27
|
+
c as EmploymentEligibility,
|
|
28
|
+
h as FederalTaxes,
|
|
28
29
|
P as Landing,
|
|
29
|
-
t as
|
|
30
|
-
|
|
31
|
-
C as OnboardingSummary,
|
|
30
|
+
t as OnboardingFlow,
|
|
31
|
+
M as OnboardingSummary,
|
|
32
32
|
k as PaymentMethod,
|
|
33
33
|
v as Profile,
|
|
34
|
-
|
|
34
|
+
x as SelfOnboardingFlow,
|
|
35
35
|
A as StateTaxes,
|
|
36
36
|
G as Taxes,
|
|
37
|
-
|
|
37
|
+
n as TerminateEmployee,
|
|
38
38
|
d as TerminationFlow,
|
|
39
|
-
|
|
39
|
+
i as TerminationSummary
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,28 +3,26 @@ import { useMachine as v } from "react-robot";
|
|
|
3
3
|
import { useTranslation as w } from "react-i18next";
|
|
4
4
|
import { FlowBreadcrumbs as F } from "../Common/FlowBreadcrumbs/FlowBreadcrumbs.js";
|
|
5
5
|
import { Flex as s, FlexItem as d } from "../Common/Flex/Flex.js";
|
|
6
|
-
import "classnames";
|
|
7
|
-
import "../../shared/constants.js";
|
|
8
6
|
import { FlowContext as j } from "./useFlow.js";
|
|
9
7
|
import { useComponentContext as E } from "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
|
-
const
|
|
8
|
+
const L = ({
|
|
11
9
|
onEvent: x,
|
|
12
10
|
machine: f
|
|
13
11
|
}) => {
|
|
14
12
|
const b = E(), { t: g } = w(), [r, h, c] = v(f, {
|
|
15
|
-
onEvent:
|
|
13
|
+
onEvent: a,
|
|
16
14
|
component: null,
|
|
17
15
|
progressBarCta: null
|
|
18
16
|
}), {
|
|
19
17
|
progressBarType: l = null,
|
|
20
|
-
totalSteps:
|
|
21
|
-
currentStep:
|
|
22
|
-
currentBreadcrumbId:
|
|
18
|
+
totalSteps: n = null,
|
|
19
|
+
currentStep: o = null,
|
|
20
|
+
currentBreadcrumbId: t,
|
|
23
21
|
breadcrumbs: B = {}
|
|
24
22
|
} = r.context;
|
|
25
|
-
function i
|
|
26
|
-
const p = { type:
|
|
27
|
-
c.child ? c.child.send(p) : C(p), x(
|
|
23
|
+
function a(i, m) {
|
|
24
|
+
const p = { type: i, payload: m }, C = h;
|
|
25
|
+
c.child ? c.child.send(p) : C(p), x(i, m);
|
|
28
26
|
}
|
|
29
27
|
return /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(
|
|
30
28
|
j.Provider,
|
|
@@ -33,12 +31,12 @@ const k = ({
|
|
|
33
31
|
...r.context
|
|
34
32
|
},
|
|
35
33
|
children: /* @__PURE__ */ u(s, { flexDirection: "column", gap: 32, children: [
|
|
36
|
-
l === "progress" &&
|
|
34
|
+
l === "progress" && o && n && /* @__PURE__ */ e(
|
|
37
35
|
b.ProgressBar,
|
|
38
36
|
{
|
|
39
|
-
totalSteps:
|
|
40
|
-
currentStep:
|
|
41
|
-
label: g("progressBarLabel", { totalSteps:
|
|
37
|
+
totalSteps: n,
|
|
38
|
+
currentStep: o,
|
|
39
|
+
label: g("progressBarLabel", { totalSteps: n, currentStep: o }),
|
|
42
40
|
cta: r.context.progressBarCta
|
|
43
41
|
}
|
|
44
42
|
),
|
|
@@ -46,9 +44,9 @@ const k = ({
|
|
|
46
44
|
/* @__PURE__ */ e(d, { flexGrow: 1, children: /* @__PURE__ */ e(
|
|
47
45
|
F,
|
|
48
46
|
{
|
|
49
|
-
breadcrumbs:
|
|
50
|
-
currentBreadcrumbId:
|
|
51
|
-
onEvent:
|
|
47
|
+
breadcrumbs: t ? B[t] ?? [] : [],
|
|
48
|
+
currentBreadcrumbId: t,
|
|
49
|
+
onEvent: a
|
|
52
50
|
}
|
|
53
51
|
) }),
|
|
54
52
|
/* @__PURE__ */ e(d, { children: r.context.progressBarCta && /* @__PURE__ */ e(r.context.progressBarCta, {}) })
|
|
@@ -59,6 +57,6 @@ const k = ({
|
|
|
59
57
|
) });
|
|
60
58
|
};
|
|
61
59
|
export {
|
|
62
|
-
|
|
60
|
+
L as Flow
|
|
63
61
|
};
|
|
64
62
|
//# sourceMappingURL=Flow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine, type SendFunction } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps<M extends Machine> = {\n machine: M\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = <M extends Machine<object, FlowContextInterface>>({\n onEvent,\n machine,\n}: FlowProps<M>) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n const event = { type, payload: data }\n const sendFn = send as SendFunction<string>\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n ;(service.child.send as SendFunction<string>)(event)\n } else {\n sendFn(event)\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","event","sendFn","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine, type SendFunction } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps<M extends Machine> = {\n machine: M\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = <M extends Machine<object, FlowContextInterface>>({\n onEvent,\n machine,\n}: FlowProps<M>) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n const event = { type, payload: data }\n const sendFn = send as SendFunction<string>\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n ;(service.child.send as SendFunction<string>)(event)\n } else {\n sendFn(event)\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","event","sendFn","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":";;;;;;;AAiBO,MAAMA,IAAO,CAAkD;AAAA,EACpE,SAAAC;AAAA,EACA,SAAAC;AACF,MAAoB;AAClB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAASC,GAAMC,CAAO,IAAIC,EAAWR,GAAS;AAAA,IACnD,SAASS;AAAA,IACT,WAAW;AAAA,IACX,gBAAgB;AAAA,EAAA,CACjB,GAEK;AAAA,IACJ,iBAAAC,IAAkB;AAAA,IAClB,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,qBAAAC;AAAA,IACA,aAAAC,IAAc,CAAA;AAAA,EAAC,IACbT,EAAQ;AAEZ,WAASI,EAAYM,GAAiBC,GAAqB;AACzD,UAAMC,IAAQ,EAAE,MAAAF,GAAM,SAASC,EAAA,GACzBE,IAASZ;AAEf,IAAIC,EAAQ,QACRA,EAAQ,MAAM,KAA8BU,CAAK,IAEnDC,EAAOD,CAAK,GAGdlB,EAAQgB,GAAMC,CAAI;AAAA,EACpB;AAEA,2BACGG,GAAA,EACC,UAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,GAAGhB,EAAQ;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAiB,EAACH,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,QAAAT,MAAoB,cAAcE,KAAeD,KAChD,gBAAAS;AAAA,UAACnB,EAAW;AAAA,UAAX;AAAA,YACC,YAAAU;AAAA,YACA,aAAAC;AAAA,YACA,OAAOT,EAAE,oBAAoB,EAAE,YAAAQ,GAAY,aAAAC,GAAa;AAAA,YACxD,KAAKP,EAAQ,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAGxBK,MAAoB,iBACnB,gBAAAY,EAACH,GAAA,EAAK,eAAc,OAAM,gBAAe,iBAAgB,YAAW,UAClE,UAAA;AAAA,UAAA,gBAAAC,EAACG,GAAA,EAAS,UAAU,GAClB,UAAA,gBAAAH;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,aAAaX,IAAuBC,EAAYD,CAAmB,KAAK,CAAA,IAAM,CAAA;AAAA,cAC9E,qBAAAA;AAAA,cACA,SAASJ;AAAA,YAAA;AAAA,UAAA,GAEb;AAAA,UACA,gBAAAW,EAACG,GAAA,EACE,UAAAlB,EAAQ,QAAQ,oCAAmBA,EAAQ,QAAQ,gBAAhB,CAAA,CAA+B,EAAA,CACrE;AAAA,QAAA,GACF;AAAA,QAEDA,EAAQ,QAAQ,+BAAcA,EAAQ,QAAQ,WAAhB,CAAA,CAA0B;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|