@gusto/embedded-react-sdk 0.49.0 → 0.51.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 +90 -0
- package/README.md +0 -8
- package/dist/components/Base/createCompoundContext.d.ts +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Base/index.d.ts +0 -1
- package/dist/components/Base/useBase.d.ts +1 -0
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Base/useBaseSubmit.js +4 -4
- package/dist/components/Base/useBaseSubmit.js.map +1 -1
- package/dist/components/Common/ActionsLayout/index.d.ts +0 -1
- package/dist/components/Common/DataView/DataCards/index.d.ts +0 -1
- package/dist/components/Common/DataView/index.d.ts +0 -1
- package/dist/components/Common/DetailViewLayout/index.d.ts +0 -1
- package/dist/components/Common/DocumentList/index.d.ts +0 -1
- package/dist/components/Common/DocumentViewer/index.d.ts +0 -1
- package/dist/components/Common/FieldCaption/index.d.ts +0 -1
- package/dist/components/Common/FieldDescription/index.d.ts +0 -1
- package/dist/components/Common/FieldErrorMessage/index.d.ts +0 -1
- package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +1 -0
- package/dist/components/Common/FieldLayout/index.d.ts +0 -1
- package/dist/components/Common/Fields/CheckboxField/index.d.ts +0 -1
- package/dist/components/Common/Fields/CheckboxGroupField/index.d.ts +0 -1
- package/dist/components/Common/Fields/ComboBoxField/index.d.ts +0 -1
- package/dist/components/Common/Fields/DatePickerField/index.d.ts +0 -1
- package/dist/components/Common/Fields/FileInputField/index.d.ts +0 -1
- package/dist/components/Common/Fields/MultiSelectComboBoxField/index.d.ts +0 -1
- package/dist/components/Common/Fields/NumberInputField/index.d.ts +0 -1
- package/dist/components/Common/Fields/RadioGroupField/index.d.ts +0 -1
- package/dist/components/Common/Fields/SelectField/index.d.ts +0 -1
- package/dist/components/Common/Fields/SwitchField/index.d.ts +0 -1
- package/dist/components/Common/Fields/TextAreaField/index.d.ts +0 -1
- package/dist/components/Common/Fields/TextInputField/index.d.ts +0 -1
- package/dist/components/Common/Fieldset/index.d.ts +0 -1
- package/dist/components/Common/Flex/index.d.ts +0 -1
- package/dist/components/Common/FlowBreadcrumbs/index.d.ts +0 -1
- package/dist/components/Common/Form/index.d.ts +0 -1
- package/dist/components/Common/HamburgerMenu/index.d.ts +0 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes.d.ts +1 -0
- package/dist/components/Common/HorizontalFieldLayout/index.d.ts +0 -1
- package/dist/components/Common/InlineSpinner/index.d.ts +0 -1
- package/dist/components/Common/OnboardingStatusBadge/index.d.ts +2 -3
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +2 -2
- package/dist/components/Common/PaginationControl/index.d.ts +0 -1
- package/dist/components/Common/PayrollLoading/PayrollLoadingTypes.d.ts +1 -1
- package/dist/components/Common/PayrollLoading/index.d.ts +0 -1
- package/dist/components/Common/ReorderableList/index.d.ts +0 -1
- package/dist/components/Common/TaxInputs/TaxInputs.d.ts +2 -2
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/TaxInputs/index.d.ts +0 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +5 -5
- package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +1 -1
- package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
- package/dist/components/Common/UI/Banner/BannerTypes.d.ts +1 -1
- package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -1
- package/dist/components/Common/UI/Box/BoxTypes.d.ts +1 -1
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +1 -1
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -1
- package/dist/components/Common/UI/BoxHeader/index.d.ts +0 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +2 -2
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/index.d.ts +0 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +2 -2
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/Button/index.d.ts +0 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarLegend.d.ts +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarLegend.js.map +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +1 -1
- package/dist/components/Common/UI/CalendarPreview/index.d.ts +0 -1
- package/dist/components/Common/UI/Card/CardTypes.d.ts +1 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +1 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/index.d.ts +0 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +2 -2
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/index.d.ts +0 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -2
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/index.d.ts +0 -1
- package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +2 -2
- package/dist/components/Common/UI/DateRangePicker/index.d.ts +0 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +2 -2
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/index.d.ts +0 -1
- package/dist/components/Common/UI/Dialog/DialogTypes.d.ts +1 -1
- package/dist/components/Common/UI/Dialog/DialogTypes.js.map +1 -1
- package/dist/components/Common/UI/Dialog/index.d.ts +0 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInputTypes.d.ts +1 -1
- package/dist/components/Common/UI/FileInput/FileInputTypes.js.map +1 -1
- package/dist/components/Common/UI/FileInput/index.d.ts +0 -1
- package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/Common/UI/Heading/index.d.ts +0 -1
- package/dist/components/Common/UI/Input/index.d.ts +0 -1
- package/dist/components/Common/UI/Link/LinkTypes.d.ts +1 -1
- package/dist/components/Common/UI/Link/index.d.ts +0 -1
- package/dist/components/Common/UI/List/ListTypes.d.ts +3 -3
- package/dist/components/Common/UI/List/index.d.ts +0 -1
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.d.ts +1 -1
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -1
- package/dist/components/Common/UI/LoadingSpinner/index.d.ts +0 -1
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +2 -2
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/Menu/index.d.ts +0 -1
- package/dist/components/Common/UI/Modal/ModalTypes.d.ts +1 -1
- package/dist/components/Common/UI/Modal/ModalTypes.js.map +1 -1
- package/dist/components/Common/UI/Modal/index.d.ts +0 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +2 -2
- package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +1 -1
- package/dist/components/Common/UI/NumberInput/index.d.ts +0 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +1 -1
- package/dist/components/Common/UI/ProgressBar/index.d.ts +0 -1
- package/dist/components/Common/UI/Radio/RadioTypes.d.ts +1 -1
- package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -1
- package/dist/components/Common/UI/Radio/index.d.ts +0 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +2 -2
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/index.d.ts +0 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -2
- package/dist/components/Common/UI/Select/index.d.ts +0 -1
- package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +1 -1
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
- package/dist/components/Common/UI/Switch/index.d.ts +0 -1
- package/dist/components/Common/UI/Table/TableTypes.d.ts +3 -3
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/Table/index.d.ts +0 -1
- package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +2 -2
- package/dist/components/Common/UI/Tabs/index.d.ts +0 -1
- package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -1
- package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
- package/dist/components/Common/UI/Text/index.d.ts +0 -1
- package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +1 -1
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -1
- package/dist/components/Common/UI/TextArea/index.d.ts +0 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
- package/dist/components/Common/UI/TextInput/index.d.ts +0 -1
- package/dist/components/Common/VisuallyHidden/index.d.ts +0 -1
- package/dist/components/Common/index.d.ts +0 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +5 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +0 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.d.ts +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +3 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +0 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.d.ts +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/index.d.ts +0 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -5
- package/dist/components/Company/BankAccount/BankAccount.d.ts +5 -5
- package/dist/components/Company/BankAccount/BankAccount.js +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountComponents.d.ts +1 -1
- package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -5
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/context.d.ts +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/index.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.d.ts +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/index.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.d.ts +2 -2
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/index.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.d.ts +2 -22
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/index.d.ts +1 -2
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +2 -5
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +10 -9
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +41 -38
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +1 -1
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/index.d.ts +0 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +5 -5
- package/dist/components/Company/Industry/Industry.js +2 -2
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Industry/index.d.ts +0 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -4
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/index.d.ts +0 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -5
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/index.d.ts +0 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.d.ts +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +25 -25
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.d.ts +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +5 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/index.d.ts +0 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +7 -83
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/index.d.ts +2 -4
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +3 -8
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +22 -27
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +93 -90
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +2 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/index.d.ts +0 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/index.d.ts +0 -1
- package/dist/components/Company/index.d.ts +0 -1
- package/dist/components/Contractor/Address/Address.js +39 -39
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/index.d.ts +0 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +2 -6
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.d.ts +5 -52
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/index.d.ts +2 -4
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +63 -24
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +102 -98
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.d.ts +0 -1
- package/dist/components/Contractor/ContractorList/index.js +1 -1
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.d.ts +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/Documents/DocumentSigner/DocumentSigner.d.ts +41 -0
- package/dist/components/Contractor/Documents/DocumentSigner/DocumentSigner.js +32 -0
- package/dist/components/Contractor/Documents/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.d.ts +22 -0
- package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.js +25 -0
- package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Contractor/Documents/DocumentSigner/index.d.ts +1 -0
- package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.d.ts +6 -0
- package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js +44 -0
- package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -1
- package/dist/components/Contractor/Documents/DocumentsList/index.d.ts +0 -1
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/index.d.ts +0 -1
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.d.ts +2 -1
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js +1 -1
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.d.ts +30 -0
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +280 -0
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Contractor/Documents/SignatureForm/index.d.ts +2 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.d.ts +175 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.js +110 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.js.map +1 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.test.d.ts +1 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.d.ts +259 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js +85 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js.map +1 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/index.d.ts +5 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.d.ts +129 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js +182 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js.map +1 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +223 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js +162 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js.map +1 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.test.d.ts +1 -0
- package/dist/components/Contractor/Landing/Landing.js +2 -2
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/Landing/index.d.ts +0 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -2
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +3 -3
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingSummary/index.d.ts +0 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +5 -5
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +106 -107
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.module.scss.js +8 -0
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.module.scss.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/index.d.ts +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.d.ts +57 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +22 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/index.d.ts +4 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.d.ts +128 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js +113 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.d.ts +85 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.js +42 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.d.ts +60 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js +21 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.d.ts +11 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.js +9 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/index.d.ts +4 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.d.ts +118 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js +94 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/types.d.ts +0 -5
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +5 -5
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -2
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +4 -4
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +2 -2
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/index.d.ts +0 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +3 -3
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +2 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +4 -4
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +3 -3
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +3 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +3 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +0 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +3 -3
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +1 -1
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/index.d.ts +0 -1
- package/dist/components/Contractor/Profile/shared/index.d.ts +0 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +3 -7
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +9 -9
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.d.ts +14 -163
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/index.d.ts +2 -4
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +76 -28
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +142 -128
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -1
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +30 -0
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js +57 -0
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -0
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +45 -0
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.js +30 -0
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -0
- package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.d.ts +8 -0
- package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.js +59 -0
- package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -0
- package/dist/components/Contractor/Submit/Submit.js +3 -3
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/exports/contractorOnboarding.d.ts +3 -0
- package/dist/components/Contractor/exports/contractorOnboarding.js +20 -14
- package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -1
- package/dist/components/Employee/Compensation/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/management/Compensation.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js +1 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/management/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +3 -3
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +1 -1
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.d.ts +2 -2
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.d.ts +20 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +2 -2
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.d.ts +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/onboarding/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +1 -1
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/getPendingCompensationChanges.d.ts +2 -2
- package/dist/components/Employee/Compensation/shared/getPendingCompensationChanges.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +3 -11
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +10 -109
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +1 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -21
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +191 -177
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/index.d.ts +0 -1
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.d.ts +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.d.ts +5 -66
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +1 -3
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +2 -10
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +20 -17
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +121 -112
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +2 -2
- package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/index.d.ts +0 -1
- package/dist/components/Employee/Deductions/index.d.ts +0 -1
- package/dist/components/Employee/Deductions/management/Deductions.d.ts +1 -1
- package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/index.d.ts +0 -1
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/index.d.ts +0 -1
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/management/index.d.ts +0 -1
- package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -1
- package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.d.ts +1 -1
- package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.d.ts +1 -1
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/index.d.ts +0 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/index.d.ts +0 -1
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +3 -7
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +9 -97
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +1 -3
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +26 -23
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +119 -106
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -5
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +8 -86
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +1 -3
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +20 -19
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +129 -120
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js +2 -2
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js +2 -2
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentsCard/index.d.ts +0 -1
- package/dist/components/Employee/Documents/management/index.d.ts +0 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/index.d.ts +0 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.d.ts +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +2 -2
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/index.d.ts +0 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/index.d.ts +0 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.d.ts +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/index.d.ts +0 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +2 -2
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/index.d.ts +0 -1
- package/dist/components/Employee/Documents/shared/SignatureForm/index.d.ts +0 -1
- package/dist/components/Employee/Documents/shared/useDocumentsList/index.d.ts +0 -1
- package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.d.ts +1 -1
- package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.js +1 -1
- package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.d.ts +39 -287
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/index.d.ts +2 -4
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -6
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +75 -25
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js +91 -90
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/shared/index.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.d.ts +3 -3
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +3 -3
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +3 -3
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/index.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/index.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/index.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.d.ts +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/index.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/index.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +2 -5
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.d.ts +6 -73
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/index.d.ts +2 -4
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +20 -30
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js +78 -69
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/index.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.d.ts +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressCard/index.d.ts +0 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/index.d.ts +0 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +3 -3
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/index.d.ts +0 -1
- package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.js +1 -1
- package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +2 -2
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/Landing/index.d.ts +0 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.d.ts +3 -3
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/index.d.ts +0 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +4 -4
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +78 -53
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/index.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/index.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/management/index.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/index.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/index.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/shared/index.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +4 -45
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +2 -3
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +15 -13
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +71 -66
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +3 -6
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +7 -6
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +1 -12
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +2 -3
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +9 -7
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +56 -49
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +2 -5
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +2 -2
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +1 -2
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +21 -7
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +3 -3
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/index.d.ts +0 -1
- package/dist/components/Employee/Paystubs/management/index.d.ts +0 -1
- package/dist/components/Employee/Paystubs/shared/usePaystubsList/index.d.ts +0 -1
- package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.d.ts +1 -1
- package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.js +3 -3
- package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileCard/index.d.ts +0 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +24 -25
- package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
- package/dist/components/Employee/Profile/management/index.d.ts +0 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +31 -32
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +4 -9
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js +19 -29
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.d.ts +12 -92
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/index.d.ts +1 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +25 -31
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +91 -80
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/index.d.ts +0 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +7 -77
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +2 -5
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +2 -4
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +57 -26
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +64 -61
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.d.ts +3 -25
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/index.d.ts +2 -4
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +43 -17
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +68 -63
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.d.ts +2 -5
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +3 -3
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/StateTaxes/index.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/index.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/management/index.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/onboarding/index.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/shared/index.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/stateTaxesFixtures.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/toWireFormat.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +36 -18
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +115 -15
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/index.d.ts +2 -3
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +14 -12
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +3 -6
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/index.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.js +1 -1
- package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +9 -9
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +6 -2
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +4 -4
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressCard/index.d.ts +0 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.d.ts +2 -2
- package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/index.d.ts +0 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.d.ts +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +3 -3
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/index.d.ts +0 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.d.ts +1 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js +1 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js.map +1 -1
- package/dist/components/Employee/index.d.ts +0 -1
- package/dist/components/Flow/Flow.js +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +4 -4
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/index.d.ts +0 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +2 -2
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/index.d.ts +0 -1
- package/dist/components/InformationRequests/InformationRequests.d.ts +3 -3
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/InformationRequests/index.d.ts +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +2 -2
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/index.d.ts +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +3 -3
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/index.d.ts +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +2 -2
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/index.d.ts +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +0 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +4 -0
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +4 -4
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/index.d.ts +0 -1
- package/dist/components/Payroll/Dismissal/index.d.ts +0 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +5 -5
- package/dist/components/Payroll/GrossUpModal/index.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycle/index.d.ts +0 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +4 -4
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/index.d.ts +0 -1
- package/dist/components/Payroll/OffCycleDeductionsSetting/index.d.ts +0 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/index.d.ts +0 -1
- package/dist/components/Payroll/OffCycleReasonSelection/index.d.ts +0 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/index.d.ts +0 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +4 -4
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +2 -2
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +7 -7
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -5
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +4 -4
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +5 -5
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +3 -3
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -4
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +2 -2
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +2 -2
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +4 -4
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +2 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +2 -2
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +8 -8
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -3
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +7 -7
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -4
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +2 -2
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/index.d.ts +0 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +2 -2
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/index.d.ts +0 -1
- package/dist/components/Payroll/RecoveryCases/index.d.ts +0 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +5 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Transition/index.d.ts +0 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +4 -4
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/index.d.ts +0 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +3 -3
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/index.d.ts +0 -1
- package/dist/components/Payroll/helpers.d.ts +6 -6
- package/dist/components/Payroll/helpers.js +1 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +0 -1
- package/dist/components/Payroll/payrollTypes.js +1 -1
- package/dist/components/Payroll/payrollTypes.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +3 -4
- package/dist/components/Payroll/usePreparedPayrollData.js +7 -7
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.d.ts +1 -1
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js +3 -3
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +3 -3
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/index.d.ts +0 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +3 -3
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.js +6 -6
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +4 -4
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +1 -4
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +4 -4
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +0 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +2 -2
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +5 -5
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +3 -3
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +6 -6
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/index.d.ts +0 -1
- package/dist/components/TimeOff/index.d.ts +0 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/index.d.ts +0 -1
- package/dist/components/index.d.ts +32 -2
- package/dist/contexts/ApiProvider/ApiProvider.d.ts +3 -3
- package/dist/contexts/ApiProvider/ApiProvider.js +3 -3
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/apiVersionHook.js +1 -1
- package/dist/contexts/ApiProvider/apiVersionHook.js.map +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.js +2 -2
- package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -2
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/GustoProvider/index.d.ts +0 -1
- package/dist/contexts/LocaleProvider/index.d.ts +0 -1
- package/dist/contexts/ObservabilityProvider/index.d.ts +0 -1
- package/dist/contexts/ThemeProvider/index.d.ts +0 -1
- package/dist/contexts/ThemeProvider/theme.js +1 -1
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/contexts/index.d.ts +0 -1
- package/dist/helpers/apiErrorToList.d.ts +1 -1
- package/dist/helpers/apiErrorToList.js.map +1 -1
- package/dist/helpers/formattedStrings.d.ts +2 -2
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/helpers/validations.d.ts +20 -0
- package/dist/helpers/validations.js +6 -3
- package/dist/helpers/validations.js.map +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.d.ts +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.js +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -1
- package/dist/i18n/I18n.d.ts +3 -2
- package/dist/i18n/I18n.js +1 -0
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Address.json.js +10 -8
- package/dist/i18n/en/Contractor.Address.json.js.map +1 -1
- package/dist/i18n/en/Contractor.PaymentMethod.json.js +3 -1
- package/dist/i18n/en/Contractor.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/Contractor.SignatureForm.json.js +38 -0
- package/dist/i18n/en/Contractor.SignatureForm.json.js.map +1 -0
- package/dist/i18n/index.d.ts +0 -1
- package/dist/i18n/types.d.ts +7470 -0
- package/dist/index.d.ts +46 -42
- package/dist/index.js +145 -267
- package/dist/index.js.map +1 -1
- package/dist/models/external.d.ts +214 -194
- package/dist/partner-hook-utils/composeErrorHandler.d.ts +2 -2
- package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js +3 -3
- package/dist/partner-hook-utils/form/buildFormSchema.d.ts +19 -9
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/index.d.ts +0 -1
- package/dist/partner-hook-utils/form/index.d.ts +0 -4
- package/dist/partner-hook-utils/form/withFlags.d.ts +18 -0
- package/dist/partner-hook-utils/form/withFlags.js +7 -0
- package/dist/partner-hook-utils/form/withFlags.js.map +1 -0
- package/dist/partner-hook-utils/index.d.ts +0 -1
- package/dist/partner-hook-utils/types.d.ts +6 -3
- package/dist/shared/constants.d.ts +18 -4
- package/dist/shared/constants.js +3 -2
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +21 -8
- package/dist/types/hooks.d.ts +2 -2
- package/dist/types/sdkError.js +16 -9
- package/dist/types/sdkError.js.map +1 -1
- package/docs/{appendix → guides}/endpoint-inventory.json +29 -0
- package/package.json +14 -14
- package/dist/assets/icons/unchecked_circular.svg.js +0 -10
- package/dist/assets/icons/unchecked_circular.svg.js.map +0 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.d.ts +0 -3
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +0 -56
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +0 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +0 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +0 -33
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +0 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +0 -16
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js.map +0 -1
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js +0 -20
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +0 -1
- package/dist/types/i18next.d.ts +0 -4075
package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompensationCard.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationCard/CompensationCard.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsDeleteMutation } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsDelete'\nimport type { Job } from '@gusto/embedded-api-v-2025-11-15/models/components/job'\nimport {\n useCompensationManagement,\n type UseCompensationManagementReady,\n} from '../../shared/useCompensationManagement'\nimport type { PendingCompensationChange } from '../../shared/getPendingCompensationChanges'\nimport { usePendingChangeDetailRenderer } from '../../shared/usePendingChangeDetailRenderer'\nimport { PendingChangesReviewModal } from '../../shared/PendingChangesReviewModal'\nimport styles from './CompensationCard.module.scss'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { DataView, useDataView, EmptyData, Loading, VisuallyHidden } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { formatDateLongWithYear, formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useFormatCompensationRate } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, FlsaStatus, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\nfunction parseJobRate(rate: Job['rate']): number | null {\n if (rate === undefined) return null\n const numericRate = parseFloat(rate)\n return Number.isFinite(numericRate) ? numericRate : null\n}\n\n/**\n * Props for {@link CompensationCard}.\n *\n * @public\n */\nexport interface CompensationCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the card emits an event. See the events table on {@link CompensationCard} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone \"Compensation\" management card that displays an employee's current jobs and compensation, surfaces pending future-dated changes, and exposes edit, add, and delete affordances.\n *\n * @remarks\n * The card owns its own data fetch, the pending-change alerts and review modal, and the delete-job confirm dialog. It does not render the compensation edit or add-job forms — instead, it emits a distinct request event for each action, and the consumer routes those to {@link CompensationEditForm}, {@link CompensationAddJobForm}, or {@link CompensationAddAnotherJobForm} and renders any post-save success alerts. {@link Compensation} bundles the card, the three form surfaces, and the swap and alert wiring as a single drop-in; reach for the card directly only when that orchestration is the wrong fit (for example, when a form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a job | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/addRequested` | Fired when the \"Add job\" CTA is clicked from the empty state | `{ employeeId: string }` |\n * | `employee/management/compensation/card/addAnotherRequested` | Fired when the \"Add another job\" CTA is clicked | `{ employeeId: string }` |\n * | `employee/management/compensation/card/jobDeleted` | Fired after a non-primary job is deleted via the card's confirm dialog | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/changeCancelled` | Fired after a scheduled future-dated change is cancelled from the card | `{ employeeId: string, compensationId: string }` |\n *\n * @param props - See {@link CompensationCardProps}.\n * @returns The rendered compensation card.\n * @public\n * @group Block Components\n */\nexport function CompensationCard(props: CompensationCardProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <CompensationCardContent {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction CompensationCardContent({ employeeId, onEvent }: CompensationCardProps) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n\n const compensation = useCompensationManagement({ employeeId })\n\n if (compensation.isLoading) {\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <Components.Box header={<Components.BoxHeader title={t('card.title')} />}>\n <Loading />\n </Components.Box>\n </BaseLayout>\n )\n }\n\n return (\n <CompensationCardReady employeeId={employeeId} onEvent={onEvent} compensation={compensation} />\n )\n}\n\ninterface CompensationCardReadyProps extends CompensationCardProps {\n compensation: UseCompensationManagementReady\n}\n\nfunction CompensationCardReady({ employeeId, onEvent, compensation }: CompensationCardReadyProps) {\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n const formatCompensationRate = useFormatCompensationRate()\n\n const { jobs, primaryFlsaStatus, pendingChanges, hasMultipleJobs, employeeFirstName } =\n compensation.data\n const { cancellingCompensationUuid } = compensation.status\n\n const handleCancelChange = useCallback(\n async (pendingChange: PendingCompensationChange) => {\n const result = await compensation.actions.cancelPendingChange(pendingChange)\n if (result) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_CHANGE_CANCELLED, {\n employeeId,\n compensationId: pendingChange.compensationUuid,\n })\n }\n },\n [compensation, onEvent, employeeId],\n )\n\n const [pendingDeleteJob, setPendingDeleteJob] = useState<{\n uuid: string\n title: string\n } | null>(null)\n\n const { mutateAsync: deleteEmployeeJob, isPending: isDeletingJob } =\n useJobsAndCompensationsDeleteMutation()\n\n const handleConfirmDeleteJob = async () => {\n if (!pendingDeleteJob) return\n const jobId = pendingDeleteJob.uuid\n await deleteEmployeeJob({ request: { jobId } })\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_JOB_DELETED, {\n employeeId,\n jobId,\n })\n setPendingDeleteJob(null)\n }\n\n const singleJob = jobs.length === 1 ? jobs[0]! : undefined\n // Block adding a secondary if the primary already has a future-dated\n // compensation that isn't Nonexempt — that comp will delete secondary jobs\n // at its effective date, matching the gws-flows guard on the new-job action.\n const localTodayISO = formatDateToStringDate(new Date()) ?? ''\n const primaryJob = jobs.find(j => j.primary)\n const hasFutureNonNonexemptComp =\n primaryJob?.compensations?.some(\n c =>\n c.effectiveDate !== undefined &&\n c.effectiveDate > localTodayISO &&\n c.flsaStatus !== FlsaStatus.NONEXEMPT,\n ) ?? false\n const canAddAnotherJob =\n jobs.length >= 1 && primaryFlsaStatus === FlsaStatus.NONEXEMPT && !hasFutureNonNonexemptComp\n const singleJobNumericRate = singleJob ? parseJobRate(singleJob.rate) : null\n const singleJobCurrentComp = singleJob?.compensations?.find(\n c => c.uuid === singleJob.currentCompensationUuid,\n )\n const emptyPlaceholder = <span aria-label={t('card.listEmptyPlaceholder')}>–</span>\n const singleJobPaymentTypeLabel = singleJob?.paymentUnit\n ? singleJob.paymentUnit === 'Hour'\n ? t('card.types.hourly')\n : singleJob.paymentUnit === 'Salary' || singleJob.paymentUnit === 'Year'\n ? t('card.types.salary')\n : singleJob.paymentUnit\n : null\n\n const [isReviewOpen, setIsReviewOpen] = useState(false)\n const renderDetail = usePendingChangeDetailRenderer(employeeFirstName)\n\n // Split pending changes: \"new job\" (job hasn't started yet, no current comp)\n // vs \"update\" (existing comp with a scheduled future change).\n const newJobPendingChanges = pendingChanges.filter(c => c.isNewJob)\n const updatePendingChanges = pendingChanges.filter(c => !c.isNewJob)\n\n useEffect(() => {\n if (updatePendingChanges.length === 0) {\n setIsReviewOpen(false)\n }\n }, [updatePendingChanges.length])\n\n const pendingNewJobUuids = new Set(newJobPendingChanges.map(c => c.jobUuid))\n const singleJobIsPendingNew = singleJob ? pendingNewJobUuids.has(singleJob.uuid) : false\n const hasAnyPendingNewJobs = pendingNewJobUuids.size > 0\n\n // Jobs with a future-dated comp stacked on a current comp (\"pending update\").\n // Editing while one is queued would stack another future comp on top —\n // hide Edit until the existing pending change is cancelled or goes into effect.\n const pendingUpdateJobUuids = new Set(updatePendingChanges.map(c => c.jobUuid))\n const singleJobHasPendingUpdate = singleJob ? pendingUpdateJobUuids.has(singleJob.uuid) : false\n\n const hasPendingUpdates = updatePendingChanges.length > 0\n const showSummaryAlert = hasMultipleJobs && updatePendingChanges.length > 1\n const showInlineAlert = hasPendingUpdates && !showSummaryAlert\n const nextChange = updatePendingChanges[0]\n\n const handleEdit = (job: Job) => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED, {\n employeeId,\n jobId: job.uuid,\n })\n }\n const handleAddJob = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_REQUESTED, { employeeId })\n }\n const handleAddAnotherJob = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_ANOTHER_REQUESTED, {\n employeeId,\n })\n }\n\n const jobsColumns = [\n {\n key: 'jobTitle',\n title: t('card.columns.jobTitle'),\n render: (job: Job) => {\n // Title lives on compensation in the API — `job.title` is a\n // denormalized snapshot that can lag behind comp-level edits on\n // pending jobs, so read from the comp pointed to by\n // `currentCompensationUuid`.\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n const numericRate = parseJobRate(job.rate)\n return (\n <>\n {currentComp?.title || '-'}\n {numericRate !== null && job.paymentUnit ? (\n <Components.Text variant=\"supporting\" size=\"sm\">\n {formatCompensationRate(numericRate, job.paymentUnit)}\n </Components.Text>\n ) : null}\n </>\n )\n },\n },\n {\n key: 'payType',\n title: t('card.columns.payType'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : '-'\n },\n },\n {\n key: 'effectiveDate',\n title: t('card.columns.effectiveDate'),\n render: (job: Job) => {\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n return currentComp?.effectiveDate ? formatDateLongWithYear(currentComp.effectiveDate) : '-'\n },\n },\n ...(hasAnyPendingNewJobs\n ? [\n {\n key: 'status',\n title: <VisuallyHidden>{t('card.columns.status')}</VisuallyHidden>,\n render: (job: Job) =>\n pendingNewJobUuids.has(job.uuid) ? (\n <Components.Badge status=\"warning\">{t('card.pendingStatus')}</Components.Badge>\n ) : null,\n },\n ]\n : []),\n ]\n\n const jobsDataView = useDataView({\n data: jobs,\n columns: jobsColumns,\n itemMenu: (job: Job) => {\n const jobHasPendingUpdate = pendingUpdateJobUuids.has(job.uuid)\n const items = [\n ...(jobHasPendingUpdate\n ? []\n : [\n {\n label: t('card.editJobCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job)\n },\n },\n ]),\n ...(!job.primary\n ? [\n {\n label: t('card.deleteJobCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n const currentComp = job.compensations?.find(\n c => c.uuid === job.currentCompensationUuid,\n )\n setPendingDeleteJob({ uuid: job.uuid, title: currentComp?.title ?? '' })\n },\n },\n ]\n : []),\n ]\n if (items.length === 0) return null\n return (\n <HamburgerMenu\n triggerLabel={t('card.hamburgerTitle')}\n isLoading={isDeletingJob}\n items={items}\n />\n )\n },\n })\n\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <Components.Box\n withPadding={!hasMultipleJobs}\n header={\n <Components.BoxHeader\n title={t('card.title')}\n action={\n hasMultipleJobs ? null : singleJob ? (\n singleJobHasPendingUpdate ? null : (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleEdit(singleJob)\n }}\n >\n {t('card.editCta')}\n </Components.Button>\n )\n ) : (\n <Components.Button\n variant=\"secondary\"\n onClick={handleAddJob}\n icon={<PlusCircleIcon />}\n >\n {t('card.addJobCta')}\n </Components.Button>\n )\n }\n />\n }\n footer={\n canAddAnotherJob ? (\n <Components.Button\n variant=\"secondary\"\n onClick={handleAddAnotherJob}\n icon={<PlusCircleIcon />}\n >\n {t('card.addAnotherJobCta')}\n </Components.Button>\n ) : undefined\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {hasPendingUpdates && (\n <div\n className={[styles.alertWrapper, hasMultipleJobs && styles.alertWrapperPadded]\n .filter(Boolean)\n .join(' ')}\n >\n <Flex flexDirection=\"column\" gap={16}>\n {showInlineAlert && nextChange && (\n <Components.Alert\n status=\"warning\"\n disableScrollIntoView\n label={\n hasMultipleJobs\n ? t('card.pendingChange.alertLabelWithJob', {\n jobTitle: nextChange.jobTitle,\n date: formatDateLongWithYear(nextChange.effectiveDate),\n })\n : t('card.pendingChange.alertLabel', {\n date: formatDateLongWithYear(nextChange.effectiveDate),\n })\n }\n >\n <Flex flexDirection=\"column\" gap={12}>\n <Components.UnorderedList\n items={nextChange.details.map(detail => renderDetail(detail))}\n />\n <div>\n <Components.Button\n variant=\"secondary\"\n isLoading={cancellingCompensationUuid === nextChange.compensationUuid}\n onClick={() => {\n void handleCancelChange(nextChange)\n }}\n >\n {t('card.pendingChange.cancelCta')}\n </Components.Button>\n </div>\n </Flex>\n </Components.Alert>\n )}\n {showSummaryAlert && (\n <Components.Alert\n status=\"warning\"\n disableScrollIntoView\n label={t('card.pendingChange.summaryLabel', {\n name: employeeFirstName ?? '',\n })}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n setIsReviewOpen(true)\n }}\n >\n {t('card.pendingChange.reviewCta')}\n </Components.Button>\n }\n />\n )}\n </Flex>\n </div>\n )}\n {hasMultipleJobs ? (\n <DataView label={t('card.tableLabel')} isWithinBox {...jobsDataView} />\n ) : singleJob ? (\n <Components.DescriptionList\n items={[\n {\n term: t('card.jobTitle'),\n description: singleJob.title || emptyPlaceholder,\n },\n {\n term: t('card.type'),\n description: singleJobPaymentTypeLabel || emptyPlaceholder,\n },\n {\n term: t('card.wage'),\n description:\n singleJobNumericRate !== null && singleJob.paymentUnit\n ? formatCompensationRate(singleJobNumericRate, singleJob.paymentUnit)\n : emptyPlaceholder,\n },\n {\n term: t('card.effectiveDate'),\n description: singleJobCurrentComp?.effectiveDate\n ? formatDateLongWithYear(singleJobCurrentComp.effectiveDate)\n : emptyPlaceholder,\n },\n ...(singleJobIsPendingNew\n ? [\n {\n term: t('card.columns.status'),\n description: (\n <Components.Badge status=\"warning\">\n {t('card.pendingStatus')}\n </Components.Badge>\n ),\n },\n ]\n : []),\n ]}\n />\n ) : (\n <EmptyData\n title={t('card.emptyState.title')}\n description={t('card.emptyState.description')}\n />\n )}\n </Flex>\n </Components.Box>\n\n <PendingChangesReviewModal\n isOpen={isReviewOpen}\n pendingChanges={updatePendingChanges}\n employeeFirstName={employeeFirstName}\n cancellingCompensationUuid={cancellingCompensationUuid}\n onClose={() => {\n setIsReviewOpen(false)\n }}\n onCancelChange={change => {\n void handleCancelChange(change)\n }}\n />\n\n <Components.Dialog\n isOpen={pendingDeleteJob !== null}\n onClose={() => {\n setPendingDeleteJob(null)\n }}\n onPrimaryActionClick={() => {\n void handleConfirmDeleteJob()\n }}\n isPrimaryActionLoading={isDeletingJob}\n isDestructive\n title={t('card.deleteJobDialog.title')}\n primaryActionLabel={t('card.deleteJobDialog.confirmCta')}\n closeActionLabel={t('card.deleteJobDialog.cancelCta')}\n >\n {pendingDeleteJob\n ? t('card.deleteJobDialog.description', {\n jobTitle: pendingDeleteJob.title,\n })\n : null}\n </Components.Dialog>\n </BaseLayout>\n )\n}\n"],"names":["parseJobRate","rate","numericRate","CompensationCard","props","jsx","BaseBoundaries","CompensationCardContent","employeeId","onEvent","useI18n","t","useTranslation","Components","useComponentContext","compensation","useCompensationManagement","BaseLayout","Loading","CompensationCardReady","formatCompensationRate","useFormatCompensationRate","jobs","primaryFlsaStatus","pendingChanges","hasMultipleJobs","employeeFirstName","cancellingCompensationUuid","handleCancelChange","useCallback","pendingChange","componentEvents","pendingDeleteJob","setPendingDeleteJob","useState","deleteEmployeeJob","isDeletingJob","useJobsAndCompensationsDeleteMutation","handleConfirmDeleteJob","jobId","singleJob","localTodayISO","formatDateToStringDate","hasFutureNonNonexemptComp","j","c","FlsaStatus","canAddAnotherJob","singleJobNumericRate","singleJobCurrentComp","emptyPlaceholder","singleJobPaymentTypeLabel","isReviewOpen","setIsReviewOpen","renderDetail","usePendingChangeDetailRenderer","newJobPendingChanges","updatePendingChanges","useEffect","pendingNewJobUuids","singleJobIsPendingNew","hasAnyPendingNewJobs","pendingUpdateJobUuids","singleJobHasPendingUpdate","hasPendingUpdates","showSummaryAlert","showInlineAlert","nextChange","handleEdit","job","handleAddJob","handleAddAnotherJob","jobsColumns","currentComp","jsxs","Fragment","flsaStatus","comp","formatDateLongWithYear","VisuallyHidden","jobsDataView","useDataView","items","PencilSvg","TrashCanSvg","HamburgerMenu","PlusCircleIcon","Flex","styles","detail","DataView","EmptyData","PendingChangesReviewModal","change"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAASA,EAAaC,GAAkC;AACtD,MAAIA,MAAS,OAAW,QAAO;AAC/B,QAAMC,IAAc,WAAWD,CAAI;AACnC,SAAO,OAAO,SAASC,CAAW,IAAIA,IAAc;AACtD;AAkCO,SAASC,GAAiBC,GAA8B;AAC7D,SACE,gBAAAC,EAACC,MAAe,eAAc,oCAC5B,4BAACC,IAAA,EAAyB,GAAGH,GAAO,EAAA,CACtC;AAEJ;AAEA,SAASG,GAAwB,EAAE,YAAAC,GAAY,SAAAC,KAAkC;AAC/E,EAAAC,GAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAAaC,EAAA,GAEbC,IAAeC,GAA0B,EAAE,YAAAR,GAAY;AAE7D,SAAIO,EAAa,YAEb,gBAAAV,EAACY,KAAW,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AAO,EAAE,uBAAuB;AAAA,cAChC,aAAa,EAAE,6BAA6B;AAAA,YAAA;AAAA,UAAA;AAAA,QAC9C,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,IAGF,gBAAAtF;AAAA,MAACuF;AAAA,MAAA;AAAA,QACC,QAAQxC;AAAA,QACR,gBAAgBK;AAAA,QAChB,mBAAA/B;AAAA,QACA,4BAAAC;AAAA,QACA,SAAS,MAAM;AACb,UAAA0B,EAAgB,EAAK;AAAA,QACvB;AAAA,QACA,gBAAgB,CAAAwC,MAAU;AACxB,UAAKjE,EAAmBiE,CAAM;AAAA,QAChC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGF,gBAAAxF;AAAA,MAACQ,EAAW;AAAA,MAAX;AAAA,QACC,QAAQmB,MAAqB;AAAA,QAC7B,SAAS,MAAM;AACb,UAAAC,EAAoB,IAAI;AAAA,QAC1B;AAAA,QACA,sBAAsB,MAAM;AAC1B,UAAKK,EAAA;AAAA,QACP;AAAA,QACA,wBAAwBF;AAAA,QACxB,eAAa;AAAA,QACb,OAAO,EAAE,4BAA4B;AAAA,QACrC,oBAAoB,EAAE,iCAAiC;AAAA,QACvD,kBAAkB,EAAE,gCAAgC;AAAA,QAEnD,UAAAJ,IACG,EAAE,oCAAoC;AAAA,UACpC,UAAUA,EAAiB;AAAA,QAAA,CAC5B,IACD;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"CompensationCard.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationCard/CompensationCard.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsDeleteMutation } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsDelete'\nimport type { Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job'\nimport {\n useCompensationManagement,\n type UseCompensationManagementReady,\n} from '../../shared/useCompensationManagement'\nimport type { PendingCompensationChange } from '../../shared/getPendingCompensationChanges'\nimport { usePendingChangeDetailRenderer } from '../../shared/usePendingChangeDetailRenderer'\nimport { PendingChangesReviewModal } from '../../shared/PendingChangesReviewModal'\nimport styles from './CompensationCard.module.scss'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { DataView, useDataView, EmptyData, Loading, VisuallyHidden } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { formatDateLongWithYear, formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useFormatCompensationRate } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, FlsaStatus, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\nfunction parseJobRate(rate: Job['rate']): number | null {\n if (rate === undefined) return null\n const numericRate = parseFloat(rate)\n return Number.isFinite(numericRate) ? numericRate : null\n}\n\n/**\n * Props for {@link CompensationCard}.\n *\n * @public\n */\nexport interface CompensationCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the card emits an event. See the events table on {@link CompensationCard} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone \"Compensation\" management card that displays an employee's current jobs and compensation, surfaces pending future-dated changes, and exposes edit, add, and delete affordances.\n *\n * @remarks\n * The card owns its own data fetch, the pending-change alerts and review modal, and the delete-job confirm dialog. It does not render the compensation edit or add-job forms — instead, it emits a distinct request event for each action, and the consumer routes those to {@link CompensationEditForm}, {@link CompensationAddJobForm}, or {@link CompensationAddAnotherJobForm} and renders any post-save success alerts. {@link Compensation} bundles the card, the three form surfaces, and the swap and alert wiring as a single drop-in; reach for the card directly only when that orchestration is the wrong fit (for example, when a form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a job | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/addRequested` | Fired when the \"Add job\" CTA is clicked from the empty state | `{ employeeId: string }` |\n * | `employee/management/compensation/card/addAnotherRequested` | Fired when the \"Add another job\" CTA is clicked | `{ employeeId: string }` |\n * | `employee/management/compensation/card/jobDeleted` | Fired after a non-primary job is deleted via the card's confirm dialog | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/changeCancelled` | Fired after a scheduled future-dated change is cancelled from the card | `{ employeeId: string, compensationId: string }` |\n *\n * @param props - See {@link CompensationCardProps}.\n * @returns The rendered compensation card.\n * @public\n * @group Block components\n */\nexport function CompensationCard(props: CompensationCardProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <CompensationCardContent {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction CompensationCardContent({ employeeId, onEvent }: CompensationCardProps) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n\n const compensation = useCompensationManagement({ employeeId })\n\n if (compensation.isLoading) {\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <Components.Box header={<Components.BoxHeader title={t('card.title')} />}>\n <Loading />\n </Components.Box>\n </BaseLayout>\n )\n }\n\n return (\n <CompensationCardReady employeeId={employeeId} onEvent={onEvent} compensation={compensation} />\n )\n}\n\ninterface CompensationCardReadyProps extends CompensationCardProps {\n compensation: UseCompensationManagementReady\n}\n\nfunction CompensationCardReady({ employeeId, onEvent, compensation }: CompensationCardReadyProps) {\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n const formatCompensationRate = useFormatCompensationRate()\n\n const { jobs, primaryFlsaStatus, pendingChanges, hasMultipleJobs, employeeFirstName } =\n compensation.data\n const { cancellingCompensationUuid } = compensation.status\n\n const handleCancelChange = useCallback(\n async (pendingChange: PendingCompensationChange) => {\n const result = await compensation.actions.cancelPendingChange(pendingChange)\n if (result) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_CHANGE_CANCELLED, {\n employeeId,\n compensationId: pendingChange.compensationUuid,\n })\n }\n },\n [compensation, onEvent, employeeId],\n )\n\n const [pendingDeleteJob, setPendingDeleteJob] = useState<{\n uuid: string\n title: string\n } | null>(null)\n\n const { mutateAsync: deleteEmployeeJob, isPending: isDeletingJob } =\n useJobsAndCompensationsDeleteMutation()\n\n const handleConfirmDeleteJob = async () => {\n if (!pendingDeleteJob) return\n const jobId = pendingDeleteJob.uuid\n await deleteEmployeeJob({ request: { jobId } })\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_JOB_DELETED, {\n employeeId,\n jobId,\n })\n setPendingDeleteJob(null)\n }\n\n const singleJob = jobs.length === 1 ? jobs[0]! : undefined\n // Block adding a secondary if the primary already has a future-dated\n // compensation that isn't Nonexempt — that comp will delete secondary jobs\n // at its effective date, matching the gws-flows guard on the new-job action.\n const localTodayISO = formatDateToStringDate(new Date()) ?? ''\n const primaryJob = jobs.find(j => j.primary)\n const hasFutureNonNonexemptComp =\n primaryJob?.compensations?.some(\n c =>\n c.effectiveDate !== undefined &&\n c.effectiveDate > localTodayISO &&\n c.flsaStatus !== FlsaStatus.NONEXEMPT,\n ) ?? false\n const canAddAnotherJob =\n jobs.length >= 1 && primaryFlsaStatus === FlsaStatus.NONEXEMPT && !hasFutureNonNonexemptComp\n const singleJobNumericRate = singleJob ? parseJobRate(singleJob.rate) : null\n const singleJobCurrentComp = singleJob?.compensations?.find(\n c => c.uuid === singleJob.currentCompensationUuid,\n )\n const emptyPlaceholder = <span aria-label={t('card.listEmptyPlaceholder')}>–</span>\n const singleJobPaymentTypeLabel = singleJob?.paymentUnit\n ? singleJob.paymentUnit === 'Hour'\n ? t('card.types.hourly')\n : singleJob.paymentUnit === 'Salary' || singleJob.paymentUnit === 'Year'\n ? t('card.types.salary')\n : singleJob.paymentUnit\n : null\n\n const [isReviewOpen, setIsReviewOpen] = useState(false)\n const renderDetail = usePendingChangeDetailRenderer(employeeFirstName)\n\n // Split pending changes: \"new job\" (job hasn't started yet, no current comp)\n // vs \"update\" (existing comp with a scheduled future change).\n const newJobPendingChanges = pendingChanges.filter(c => c.isNewJob)\n const updatePendingChanges = pendingChanges.filter(c => !c.isNewJob)\n\n useEffect(() => {\n if (updatePendingChanges.length === 0) {\n setIsReviewOpen(false)\n }\n }, [updatePendingChanges.length])\n\n const pendingNewJobUuids = new Set(newJobPendingChanges.map(c => c.jobUuid))\n const singleJobIsPendingNew = singleJob ? pendingNewJobUuids.has(singleJob.uuid) : false\n const hasAnyPendingNewJobs = pendingNewJobUuids.size > 0\n\n // Jobs with a future-dated comp stacked on a current comp (\"pending update\").\n // Editing while one is queued would stack another future comp on top —\n // hide Edit until the existing pending change is cancelled or goes into effect.\n const pendingUpdateJobUuids = new Set(updatePendingChanges.map(c => c.jobUuid))\n const singleJobHasPendingUpdate = singleJob ? pendingUpdateJobUuids.has(singleJob.uuid) : false\n\n const hasPendingUpdates = updatePendingChanges.length > 0\n const showSummaryAlert = hasMultipleJobs && updatePendingChanges.length > 1\n const showInlineAlert = hasPendingUpdates && !showSummaryAlert\n const nextChange = updatePendingChanges[0]\n\n const handleEdit = (job: Job) => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED, {\n employeeId,\n jobId: job.uuid,\n })\n }\n const handleAddJob = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_REQUESTED, { employeeId })\n }\n const handleAddAnotherJob = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_ANOTHER_REQUESTED, {\n employeeId,\n })\n }\n\n const jobsColumns = [\n {\n key: 'jobTitle',\n title: t('card.columns.jobTitle'),\n render: (job: Job) => {\n // Title lives on compensation in the API — `job.title` is a\n // denormalized snapshot that can lag behind comp-level edits on\n // pending jobs, so read from the comp pointed to by\n // `currentCompensationUuid`.\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n const numericRate = parseJobRate(job.rate)\n return (\n <>\n {currentComp?.title || '-'}\n {numericRate !== null && job.paymentUnit ? (\n <Components.Text variant=\"supporting\" size=\"sm\">\n {formatCompensationRate(numericRate, job.paymentUnit)}\n </Components.Text>\n ) : null}\n </>\n )\n },\n },\n {\n key: 'payType',\n title: t('card.columns.payType'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : '-'\n },\n },\n {\n key: 'effectiveDate',\n title: t('card.columns.effectiveDate'),\n render: (job: Job) => {\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n return currentComp?.effectiveDate ? formatDateLongWithYear(currentComp.effectiveDate) : '-'\n },\n },\n ...(hasAnyPendingNewJobs\n ? [\n {\n key: 'status',\n title: <VisuallyHidden>{t('card.columns.status')}</VisuallyHidden>,\n render: (job: Job) =>\n pendingNewJobUuids.has(job.uuid) ? (\n <Components.Badge status=\"warning\">{t('card.pendingStatus')}</Components.Badge>\n ) : null,\n },\n ]\n : []),\n ]\n\n const jobsDataView = useDataView({\n data: jobs,\n columns: jobsColumns,\n itemMenu: (job: Job) => {\n const jobHasPendingUpdate = pendingUpdateJobUuids.has(job.uuid)\n const items = [\n ...(jobHasPendingUpdate\n ? []\n : [\n {\n label: t('card.editJobCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job)\n },\n },\n ]),\n ...(!job.primary\n ? [\n {\n label: t('card.deleteJobCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n const currentComp = job.compensations?.find(\n c => c.uuid === job.currentCompensationUuid,\n )\n setPendingDeleteJob({ uuid: job.uuid, title: currentComp?.title ?? '' })\n },\n },\n ]\n : []),\n ]\n if (items.length === 0) return null\n return (\n <HamburgerMenu\n triggerLabel={t('card.hamburgerTitle')}\n isLoading={isDeletingJob}\n items={items}\n />\n )\n },\n })\n\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <Components.Box\n withPadding={!hasMultipleJobs}\n header={\n <Components.BoxHeader\n title={t('card.title')}\n action={\n hasMultipleJobs ? null : singleJob ? (\n singleJobHasPendingUpdate ? null : (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleEdit(singleJob)\n }}\n >\n {t('card.editCta')}\n </Components.Button>\n )\n ) : (\n <Components.Button\n variant=\"secondary\"\n onClick={handleAddJob}\n icon={<PlusCircleIcon />}\n >\n {t('card.addJobCta')}\n </Components.Button>\n )\n }\n />\n }\n footer={\n canAddAnotherJob ? (\n <Components.Button\n variant=\"secondary\"\n onClick={handleAddAnotherJob}\n icon={<PlusCircleIcon />}\n >\n {t('card.addAnotherJobCta')}\n </Components.Button>\n ) : undefined\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {hasPendingUpdates && (\n <div\n className={[styles.alertWrapper, hasMultipleJobs && styles.alertWrapperPadded]\n .filter(Boolean)\n .join(' ')}\n >\n <Flex flexDirection=\"column\" gap={16}>\n {showInlineAlert && nextChange && (\n <Components.Alert\n status=\"warning\"\n disableScrollIntoView\n label={\n hasMultipleJobs\n ? t('card.pendingChange.alertLabelWithJob', {\n jobTitle: nextChange.jobTitle,\n date: formatDateLongWithYear(nextChange.effectiveDate),\n })\n : t('card.pendingChange.alertLabel', {\n date: formatDateLongWithYear(nextChange.effectiveDate),\n })\n }\n >\n <Flex flexDirection=\"column\" gap={12}>\n <Components.UnorderedList\n items={nextChange.details.map(detail => renderDetail(detail))}\n />\n <div>\n <Components.Button\n variant=\"secondary\"\n isLoading={cancellingCompensationUuid === nextChange.compensationUuid}\n onClick={() => {\n void handleCancelChange(nextChange)\n }}\n >\n {t('card.pendingChange.cancelCta')}\n </Components.Button>\n </div>\n </Flex>\n </Components.Alert>\n )}\n {showSummaryAlert && (\n <Components.Alert\n status=\"warning\"\n disableScrollIntoView\n label={t('card.pendingChange.summaryLabel', {\n name: employeeFirstName ?? '',\n })}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n setIsReviewOpen(true)\n }}\n >\n {t('card.pendingChange.reviewCta')}\n </Components.Button>\n }\n />\n )}\n </Flex>\n </div>\n )}\n {hasMultipleJobs ? (\n <DataView label={t('card.tableLabel')} isWithinBox {...jobsDataView} />\n ) : singleJob ? (\n <Components.DescriptionList\n items={[\n {\n term: t('card.jobTitle'),\n description: singleJob.title || emptyPlaceholder,\n },\n {\n term: t('card.type'),\n description: singleJobPaymentTypeLabel || emptyPlaceholder,\n },\n {\n term: t('card.wage'),\n description:\n singleJobNumericRate !== null && singleJob.paymentUnit\n ? formatCompensationRate(singleJobNumericRate, singleJob.paymentUnit)\n : emptyPlaceholder,\n },\n {\n term: t('card.effectiveDate'),\n description: singleJobCurrentComp?.effectiveDate\n ? formatDateLongWithYear(singleJobCurrentComp.effectiveDate)\n : emptyPlaceholder,\n },\n ...(singleJobIsPendingNew\n ? [\n {\n term: t('card.columns.status'),\n description: (\n <Components.Badge status=\"warning\">\n {t('card.pendingStatus')}\n </Components.Badge>\n ),\n },\n ]\n : []),\n ]}\n />\n ) : (\n <EmptyData\n title={t('card.emptyState.title')}\n description={t('card.emptyState.description')}\n />\n )}\n </Flex>\n </Components.Box>\n\n <PendingChangesReviewModal\n isOpen={isReviewOpen}\n pendingChanges={updatePendingChanges}\n employeeFirstName={employeeFirstName}\n cancellingCompensationUuid={cancellingCompensationUuid}\n onClose={() => {\n setIsReviewOpen(false)\n }}\n onCancelChange={change => {\n void handleCancelChange(change)\n }}\n />\n\n <Components.Dialog\n isOpen={pendingDeleteJob !== null}\n onClose={() => {\n setPendingDeleteJob(null)\n }}\n onPrimaryActionClick={() => {\n void handleConfirmDeleteJob()\n }}\n isPrimaryActionLoading={isDeletingJob}\n isDestructive\n title={t('card.deleteJobDialog.title')}\n primaryActionLabel={t('card.deleteJobDialog.confirmCta')}\n closeActionLabel={t('card.deleteJobDialog.cancelCta')}\n >\n {pendingDeleteJob\n ? t('card.deleteJobDialog.description', {\n jobTitle: pendingDeleteJob.title,\n })\n : null}\n </Components.Dialog>\n </BaseLayout>\n )\n}\n"],"names":["parseJobRate","rate","numericRate","CompensationCard","props","jsx","BaseBoundaries","CompensationCardContent","employeeId","onEvent","useI18n","t","useTranslation","Components","useComponentContext","compensation","useCompensationManagement","BaseLayout","Loading","CompensationCardReady","formatCompensationRate","useFormatCompensationRate","jobs","primaryFlsaStatus","pendingChanges","hasMultipleJobs","employeeFirstName","cancellingCompensationUuid","handleCancelChange","useCallback","pendingChange","componentEvents","pendingDeleteJob","setPendingDeleteJob","useState","deleteEmployeeJob","isDeletingJob","useJobsAndCompensationsDeleteMutation","handleConfirmDeleteJob","jobId","singleJob","localTodayISO","formatDateToStringDate","hasFutureNonNonexemptComp","j","c","FlsaStatus","canAddAnotherJob","singleJobNumericRate","singleJobCurrentComp","emptyPlaceholder","singleJobPaymentTypeLabel","isReviewOpen","setIsReviewOpen","renderDetail","usePendingChangeDetailRenderer","newJobPendingChanges","updatePendingChanges","useEffect","pendingNewJobUuids","singleJobIsPendingNew","hasAnyPendingNewJobs","pendingUpdateJobUuids","singleJobHasPendingUpdate","hasPendingUpdates","showSummaryAlert","showInlineAlert","nextChange","handleEdit","job","handleAddJob","handleAddAnotherJob","jobsColumns","currentComp","jsxs","Fragment","flsaStatus","comp","formatDateLongWithYear","VisuallyHidden","jobsDataView","useDataView","items","PencilSvg","TrashCanSvg","HamburgerMenu","PlusCircleIcon","Flex","styles","detail","DataView","EmptyData","PendingChangesReviewModal","change"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAASA,EAAaC,GAAkC;AACtD,MAAIA,MAAS,OAAW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UAAAJ,IACG,EAAE,oCAAoC;AAAA,UACpC,UAAUA,EAAiB;AAAA,QAAA,CAC5B,IACD;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;"}
|
|
@@ -34,6 +34,6 @@ export interface CompensationEditFormProps extends CommonComponentInterface<'Emp
|
|
|
34
34
|
* @param props - See {@link CompensationEditFormProps}.
|
|
35
35
|
* @returns The rendered compensation edit form.
|
|
36
36
|
* @public
|
|
37
|
-
* @group Block
|
|
37
|
+
* @group Block components
|
|
38
38
|
*/
|
|
39
39
|
export declare function CompensationEditForm({ employeeId, jobId, onEvent, dictionary, }: CompensationEditFormProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { useJobsAndCompensationsGetJobs as p } from "@gusto/embedded-api-v-
|
|
2
|
+
import { useJobsAndCompensationsGetJobs as p } from "@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs";
|
|
3
3
|
import { getPendingCompensationChanges as d } from "../../shared/getPendingCompensationChanges.js";
|
|
4
4
|
import { CompensationEditJobForm as f } from "../CompensationEditJobForm/CompensationEditJobForm.js";
|
|
5
5
|
import { CompensationEditPendingJobForm as u } from "../CompensationEditPendingJobForm/CompensationEditPendingJobForm.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompensationEditForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.tsx"],"sourcesContent":["import { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-
|
|
1
|
+
{"version":3,"file":"CompensationEditForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.tsx"],"sourcesContent":["import { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs'\nimport { getPendingCompensationChanges } from '../../shared/getPendingCompensationChanges'\nimport { CompensationEditJobForm } from '../CompensationEditJobForm/CompensationEditJobForm'\nimport { CompensationEditPendingJobForm } from '../CompensationEditPendingJobForm/CompensationEditPendingJobForm'\nimport { BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationEditForm}.\n *\n * @public\n */\nexport interface CompensationEditFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /**\n * The id of the job whose compensation is being edited (for example, the `jobId` from the\n * {@link CompensationCard} `employee/management/compensation/card/editRequested` payload).\n * The form inspects the job's compensations to decide whether to edit the current\n * compensation or an already-scheduled future-dated change.\n */\n jobId: string\n /** Callback invoked when the form emits an event. See the events table on {@link CompensationEditForm} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone form that edits the compensation for a single job, branching automatically between editing the current compensation and an already-scheduled future-dated change.\n *\n * @remarks\n * Pair with {@link CompensationCard} to route its `employee/management/compensation/card/editRequested` event to this form. {@link Compensation} bundles the card, the three form surfaces (edit, add job, add another job), and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit (for example, when the form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/editForm/submitted` | Fired after the compensation change is saved; use it to return to the card | The updated `Compensation` entity |\n * | `employee/management/compensation/editForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link CompensationEditFormProps}.\n * @returns The rendered compensation edit form.\n * @public\n * @group Block components\n */\nexport function CompensationEditForm({\n employeeId,\n jobId,\n onEvent,\n dictionary,\n}: CompensationEditFormProps) {\n const jobsQuery = useJobsAndCompensationsGetJobs({ employeeId }, { enabled: !!employeeId })\n\n if (jobsQuery.isLoading || !jobsQuery.data) {\n const errorHandling = composeErrorHandler([jobsQuery])\n return <BaseLayout isLoading error={errorHandling.errors} />\n }\n\n const job = jobsQuery.data.jobs?.find(j => j.uuid === jobId)\n\n // The API does not guarantee ordering of job.compensations, so rely on the\n // same sorted helper that drives the card display (ascending by effectiveDate)\n // to find the nearest pending change.\n const nearestPending = getPendingCompensationChanges(job ? [job] : [])[0]\n\n if (nearestPending) {\n return (\n <CompensationEditPendingJobForm\n employeeId={employeeId}\n jobId={jobId}\n compensationId={nearestPending.compensationUuid}\n isNewJob={nearestPending.isNewJob}\n isPrimaryJob={job?.primary ?? false}\n onEvent={onEvent}\n dictionary={dictionary}\n />\n )\n }\n\n return (\n <CompensationEditJobForm\n employeeId={employeeId}\n jobId={jobId}\n onEvent={onEvent}\n dictionary={dictionary}\n />\n )\n}\n"],"names":["CompensationEditForm","employeeId","jobId","onEvent","dictionary","jobsQuery","useJobsAndCompensationsGetJobs","errorHandling","composeErrorHandler","BaseLayout","job","j","nearestPending","getPendingCompensationChanges","jsx","CompensationEditPendingJobForm","CompensationEditJobForm"],"mappings":";;;;;;;;AA6CO,SAASA,EAAqB;AAAA,EACnC,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,GAA8B;AAC5B,QAAMC,IAAYC,EAA+B,EAAE,YAAAL,EAAA,GAAc,EAAE,SAAS,CAAC,CAACA,GAAY;AAE1F,MAAII,EAAU,aAAa,CAACA,EAAU,MAAM;AAC1C,UAAME,IAAgBC,EAAoB,CAACH,CAAS,CAAC;AACrD,6BAAQI,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAc,QAAQ;AAAA,EAC5D;AAEA,QAAMG,IAAML,EAAU,KAAK,MAAM,KAAK,CAAAM,MAAKA,EAAE,SAAST,CAAK,GAKrDU,IAAiBC,EAA8BH,IAAM,CAACA,CAAG,IAAI,CAAA,CAAE,EAAE,CAAC;AAExE,SAAIE,IAEA,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAAd;AAAA,MACA,OAAAC;AAAA,MACA,gBAAgBU,EAAe;AAAA,MAC/B,UAAUA,EAAe;AAAA,MACzB,cAAcF,GAAK,WAAW;AAAA,MAC9B,SAAAP;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,EAAA,IAMJ,gBAAAU;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,YAAAf;AAAA,MACA,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import C from "classnames";
|
|
3
3
|
import { useTranslation as b } from "react-i18next";
|
|
4
|
-
import { useJobsAndCompensationsGetJobs as M } from "@gusto/embedded-api-v-
|
|
4
|
+
import { useJobsAndCompensationsGetJobs as M } from "@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs";
|
|
5
5
|
import { useJobForm as F } from "../../shared/useJobForm/useJobForm.js";
|
|
6
6
|
import { useCompensationForm as N } from "../../shared/useCompensationForm/useCompensationForm.js";
|
|
7
7
|
import { ManagementCompensationFormBody as L } from "../ManagementCompensationFormBody.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompensationEditJobForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsGetJobs'\nimport { useJobForm } from '../../shared/useJobForm'\nimport { useCompensationForm, type CompensationFormData } from '../../shared/useCompensationForm'\nimport { ManagementCompensationFormBody } from '../ManagementCompensationFormBody'\nimport styles from './CompensationEditJobForm.module.scss'\nimport { BaseBoundaries, BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { composeSubmitHandler } from '@/partner-hook-utils/form/composeSubmitHandler'\nimport { componentEvents, type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationEditJobForm}.\n *\n * @public\n */\nexport interface CompensationEditJobFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The job whose compensation is being edited. */\n jobId: string\n /** Fires `EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_SUBMITTED` (with the saved\n * `Compensation`) on a successful save, and\n * `EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_CANCELLED` when the user cancels. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Schedules a future-dated compensation change for a job that's already in effect.\n *\n * @public\n */\nexport function CompensationEditJobForm({ dictionary, ...props }: CompensationEditJobFormProps) {\n useComponentDictionary('Employee.Management.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <CompensationDefaultsLoader {...props} />\n </BaseBoundaries>\n )\n}\n\ntype LoaderProps = Omit<CompensationEditJobFormProps, 'dictionary'>\n\n// Fetches the current job's compensation data to pre-populate the form as\n// defaultValues before rendering Root. Uses the same non-suspense query that\n// useCompensationForm uses internally — React Query dedupes the request so no\n// extra network call is made once Root mounts.\n// defaultValues from CommonComponentInterface (unknown) is excluded from the\n// spread so it doesn't conflict with Root's typed defaultValues prop.\nfunction CompensationDefaultsLoader({\n employeeId,\n jobId,\n defaultValues: _baseDefaults,\n ...rest\n}: LoaderProps) {\n const jobsQuery = useJobsAndCompensationsGetJobs({ employeeId }, { enabled: !!employeeId })\n\n if (jobsQuery.isLoading || !jobsQuery.data) {\n const errorHandling = composeErrorHandler([jobsQuery])\n return <BaseLayout isLoading error={errorHandling.errors} />\n }\n\n const job = jobsQuery.data.jobs?.find(j => j.uuid === jobId)\n const currentComp = job?.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n\n const defaultValues: Partial<CompensationFormData> | undefined = currentComp\n ? {\n // Title lives on compensation in the API — `job.title` can lag\n // behind comp-level edits on secondaries, so seed directly from\n // the comp.\n title: currentComp.title ?? undefined,\n flsaStatus: currentComp.flsaStatus ?? undefined,\n rate: Number(currentComp.rate),\n paymentUnit: currentComp.paymentUnit ?? undefined,\n adjustForMinimumWage: currentComp.adjustForMinimumWage ?? false,\n minimumWageId: currentComp.minimumWages?.[0]?.uuid ?? '',\n // effectiveDate intentionally omitted — user must choose a future date\n }\n : undefined\n\n return <Root employeeId={employeeId} jobId={jobId} defaultValues={defaultValues} {...rest} />\n}\n\ninterface RootProps extends LoaderProps {\n defaultValues?: Partial<CompensationFormData>\n}\n\nfunction Root({ employeeId, jobId, defaultValues, className, onEvent }: RootProps) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n\n // Job form handles the non-effective-dated fields: 2% shareholder + WA WC.\n // Title is suppressed here because the compensation form owns title\n // (effective-dated alongside rate/unit/FLSA on the future-dated row).\n // Hire-date is suppressed because this surface never edits it.\n const jobForm = useJobForm({\n employeeId,\n jobId,\n withTitleField: false,\n withHireDateField: false,\n shouldFocusError: false,\n })\n\n // Compensation form runs in create mode (no compensationId) → POST\n // /v1/jobs/:jobId/compensations, creating a new future-dated compensation.\n // The form is pre-populated with the current comp's values via defaultValues\n // (fetched by CompensationDefaultsLoader) so the user can edit from the\n // current state, and picks a future effectiveDate to schedule the change.\n const compensationForm = useCompensationForm({\n employeeId,\n jobId,\n defaultValues,\n withEffectiveDateField: true,\n optionalFieldsToRequire: {\n create: ['title'],\n },\n shouldFocusError: false,\n })\n\n if (jobForm.isLoading || compensationForm.isLoading) {\n const loadingErrorHandling = composeErrorHandler([jobForm, compensationForm])\n return <BaseLayout isLoading error={loadingErrorHandling.errors} />\n }\n\n // PUT job first (immediate mutation of 2% shareholder / WC), then POST\n // the new compensation (the future-dated change). composeSubmitHandler\n // validates both forms in parallel and short-circuits before any network\n // I/O if either fails.\n const submitResult = composeSubmitHandler([jobForm, compensationForm], async () => {\n const jobResult = await jobForm.actions.onSubmit()\n if (!jobResult) return\n\n const compensationResult = await compensationForm.actions.onSubmit()\n if (!compensationResult) return\n\n onEvent(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_SUBMITTED,\n compensationResult.data,\n )\n })\n\n const errorHandling = composeErrorHandler([submitResult])\n const isPending = jobForm.status.isPending || compensationForm.status.isPending\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={errorHandling.errors}>\n <Form onSubmit={submitResult.handleSubmit}>\n <ManagementCompensationFormBody\n jobForm={jobForm}\n compensationForm={compensationForm}\n title={t('editCompensationTitle')}\n submitCtaLabel={t('saveCta')}\n isPending={isPending}\n onCancel={() => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_CANCELLED)\n }}\n />\n </Form>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["CompensationEditJobForm","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","CompensationDefaultsLoader","employeeId","jobId","_baseDefaults","rest","jobsQuery","useJobsAndCompensationsGetJobs","errorHandling","composeErrorHandler","BaseLayout","job","j","currentComp","c","defaultValues","Root","className","onEvent","useI18n","t","useTranslation","jobForm","useJobForm","compensationForm","useCompensationForm","loadingErrorHandling","submitResult","composeSubmitHandler","compensationResult","componentEvents","isPending","classNames","styles","Form","ManagementCompensationFormBody"],"mappings":";;;;;;;;;;;;;;;AAoCO,SAASA,EAAwB,EAAE,YAAAC,GAAY,GAAGC,KAAuC;AAC9F,SAAAC,EAAuB,oCAAoCF,CAAU,GAEnE,gBAAAG,EAACC,KAAe,eAAc,oCAC5B,4BAACC,GAAA,EAA4B,GAAGJ,GAAO,EAAA,CACzC;AAEJ;AAUA,SAASI,EAA2B;AAAA,EAClC,YAAAC;AAAA,EACA,OAAAC;AAAA,EAC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AyB;AAAA,MACvB,QAAQ,CAAC,OAAO;AAAA,IAAA;AAAA,IAElB,kBAAkB;AAAA,EAAA,CACnB;AAED,MAAIO,EAAQ,aAAaE,EAAiB,WAAW;AACnD,UAAME,IAAuBjB,EAAoB,CAACa,GAASE,CAAgB,CAAC;AAC5E,6BAAQd,GAAA,EAAW,WAAS,IAAC,OAAOgB,EAAqB,QAAQ;AAAA,EACnE;AAMA,QAAMC,IAAeC,EAAqB,CAACN,GAASE,CAAgB,GAAG,YAAY;AAEjF,QAAI,CADc,MAAMF,EAAQ,QAAQ,SAAA,EACxB;AAEhB,UAAMO,IAAqB,MAAML,EAAiB,QAAQ,SAAA;AAC1D,IAAKK,KAELX;AAAA,MACEY,EAAgB;AAAA,MAChBD,EAAmB;AAAA,IAAA;AAAA,EAEvB,CAAC,GAEKrB,IAAgBC,EAAoB,CAACkB,CAAY,CAAC,GAClDI,IAAYT,EAAQ,OAAO,aAAaE,EAAiB,OAAO;AAEtE,2BACG,WAAA,EAAQ,WAAWQ,EAAWC,EAAO,WAAWhB,CAAS,GACxD,UAAA,gBAAAlB,EAACW,GAAA,EAAW,OAAOF,EAAc,QAC/B,4BAAC0B,GAAA,EAAK,UAAUP,EAAa,cAC3B,UAAA,gBAAA5B;AAAA,IAACoC;AAAA,IAAA;AAAA,MACC,SAAAb;AAAA,MACA,kBAAAE;AAAA,MACA,OAAOJ,EAAE,uBAAuB;AAAA,MAChC,gBAAgBA,EAAE,SAAS;AAAA,MAC3B,WAAAW;AAAA,MACA,UAAU,MAAM;AACd,QAAAb,EAAQY,EAAgB,oDAAoD;AAAA,MAC9E;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"CompensationEditJobForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs'\nimport { useJobForm } from '../../shared/useJobForm'\nimport { useCompensationForm, type CompensationFormData } from '../../shared/useCompensationForm'\nimport { ManagementCompensationFormBody } from '../ManagementCompensationFormBody'\nimport styles from './CompensationEditJobForm.module.scss'\nimport { BaseBoundaries, BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { composeSubmitHandler } from '@/partner-hook-utils/form/composeSubmitHandler'\nimport { componentEvents, type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationEditJobForm}.\n *\n * @public\n */\nexport interface CompensationEditJobFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The job whose compensation is being edited. */\n jobId: string\n /** Fires `EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_SUBMITTED` (with the saved\n * `Compensation`) on a successful save, and\n * `EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_CANCELLED` when the user cancels. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Schedules a future-dated compensation change for a job that's already in effect.\n *\n * @public\n */\nexport function CompensationEditJobForm({ dictionary, ...props }: CompensationEditJobFormProps) {\n useComponentDictionary('Employee.Management.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <CompensationDefaultsLoader {...props} />\n </BaseBoundaries>\n )\n}\n\ntype LoaderProps = Omit<CompensationEditJobFormProps, 'dictionary'>\n\n// Fetches the current job's compensation data to pre-populate the form as\n// defaultValues before rendering Root. Uses the same non-suspense query that\n// useCompensationForm uses internally — React Query dedupes the request so no\n// extra network call is made once Root mounts.\n// defaultValues from CommonComponentInterface (unknown) is excluded from the\n// spread so it doesn't conflict with Root's typed defaultValues prop.\nfunction CompensationDefaultsLoader({\n employeeId,\n jobId,\n defaultValues: _baseDefaults,\n ...rest\n}: LoaderProps) {\n const jobsQuery = useJobsAndCompensationsGetJobs({ employeeId }, { enabled: !!employeeId })\n\n if (jobsQuery.isLoading || !jobsQuery.data) {\n const errorHandling = composeErrorHandler([jobsQuery])\n return <BaseLayout isLoading error={errorHandling.errors} />\n }\n\n const job = jobsQuery.data.jobs?.find(j => j.uuid === jobId)\n const currentComp = job?.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n\n const defaultValues: Partial<CompensationFormData> | undefined = currentComp\n ? {\n // Title lives on compensation in the API — `job.title` can lag\n // behind comp-level edits on secondaries, so seed directly from\n // the comp.\n title: currentComp.title ?? undefined,\n flsaStatus: currentComp.flsaStatus ?? undefined,\n rate: Number(currentComp.rate),\n paymentUnit: currentComp.paymentUnit ?? undefined,\n adjustForMinimumWage: currentComp.adjustForMinimumWage ?? false,\n minimumWageId: currentComp.minimumWages?.[0]?.uuid ?? '',\n // effectiveDate intentionally omitted — user must choose a future date\n }\n : undefined\n\n return <Root employeeId={employeeId} jobId={jobId} defaultValues={defaultValues} {...rest} />\n}\n\ninterface RootProps extends LoaderProps {\n defaultValues?: Partial<CompensationFormData>\n}\n\nfunction Root({ employeeId, jobId, defaultValues, className, onEvent }: RootProps) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n\n // Job form handles the non-effective-dated fields: 2% shareholder + WA WC.\n // Title is suppressed here because the compensation form owns title\n // (effective-dated alongside rate/unit/FLSA on the future-dated row).\n // Hire-date is suppressed because this surface never edits it.\n const jobForm = useJobForm({\n employeeId,\n jobId,\n withTitleField: false,\n withHireDateField: false,\n shouldFocusError: false,\n })\n\n // Compensation form runs in create mode (no compensationId) → POST\n // /v1/jobs/:jobId/compensations, creating a new future-dated compensation.\n // The form is pre-populated with the current comp's values via defaultValues\n // (fetched by CompensationDefaultsLoader) so the user can edit from the\n // current state, and picks a future effectiveDate to schedule the change.\n const compensationForm = useCompensationForm({\n employeeId,\n jobId,\n defaultValues,\n withEffectiveDateField: true,\n optionalFieldsToRequire: {\n create: ['title'],\n },\n shouldFocusError: false,\n })\n\n if (jobForm.isLoading || compensationForm.isLoading) {\n const loadingErrorHandling = composeErrorHandler([jobForm, compensationForm])\n return <BaseLayout isLoading error={loadingErrorHandling.errors} />\n }\n\n // PUT job first (immediate mutation of 2% shareholder / WC), then POST\n // the new compensation (the future-dated change). composeSubmitHandler\n // validates both forms in parallel and short-circuits before any network\n // I/O if either fails.\n const submitResult = composeSubmitHandler([jobForm, compensationForm], async () => {\n const jobResult = await jobForm.actions.onSubmit()\n if (!jobResult) return\n\n const compensationResult = await compensationForm.actions.onSubmit()\n if (!compensationResult) return\n\n onEvent(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_SUBMITTED,\n compensationResult.data,\n )\n })\n\n const errorHandling = composeErrorHandler([submitResult])\n const isPending = jobForm.status.isPending || compensationForm.status.isPending\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={errorHandling.errors}>\n <Form onSubmit={submitResult.handleSubmit}>\n <ManagementCompensationFormBody\n jobForm={jobForm}\n compensationForm={compensationForm}\n title={t('editCompensationTitle')}\n submitCtaLabel={t('saveCta')}\n isPending={isPending}\n onCancel={() => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_CANCELLED)\n }}\n />\n </Form>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["CompensationEditJobForm","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","CompensationDefaultsLoader","employeeId","jobId","_baseDefaults","rest","jobsQuery","useJobsAndCompensationsGetJobs","errorHandling","composeErrorHandler","BaseLayout","job","j","currentComp","c","defaultValues","Root","className","onEvent","useI18n","t","useTranslation","jobForm","useJobForm","compensationForm","useCompensationForm","loadingErrorHandling","submitResult","composeSubmitHandler","compensationResult","componentEvents","isPending","classNames","styles","Form","ManagementCompensationForm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AACd,QAAAb,EAAQY,EAAgB,oDAAoD;AAAA,MAC9E;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;"}
|
package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagementCompensationFormBody.js","sources":["../../../../../src/components/Employee/Compensation/management/ManagementCompensationFormBody.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api-v-2025-11-15/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2025-11-15/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api-v-2025-11-15/models/components/minimumwage'\nimport type { UseJobFormReady } from '../shared/useJobForm'\nimport type { UseCompensationFormReady } from '../shared/useCompensationForm'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FLSA_OVERTIME_SALARY_LIMIT } from '@/shared/constants'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\n/** @internal */\nexport interface ManagementCompensationFormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n title: string\n submitCtaLabel: string\n isPending: boolean\n onCancel?: () => void\n}\n\n/**\n * Renders the shared field layout used by both `EditCompensation` (schedule a future comp\n * change for a present job) and `EditPendingCompensation` (update an existing future comp).\n * Field visibility is driven entirely by hook configuration — the hooks expose `undefined`\n * for fields that should not render — so this component renders the correct subset for each\n * use case without extra conditional props.\n *\n * @internal\n */\nexport function ManagementCompensationFormBody({\n jobForm,\n compensationForm,\n title,\n submitCtaLabel,\n isPending,\n onCancel,\n}: ManagementCompensationFormBodyProps) {\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n const format = useNumberFormatter('currency')\n\n const JobFields = jobForm.form.Fields\n const CompFields = compensationForm.form.Fields\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n <CompFields.Title\n label={t('jobTitleLabel')}\n validationMessages={{ REQUIRED: t('validations.jobTitleSentence') }}\n formHookResult={compensationForm}\n />\n\n {JobFields.HireDate && (\n <JobFields.HireDate\n label={t('hireDateLabel')}\n validationMessages={{\n REQUIRED: t('validations.hireDate'),\n }}\n formHookResult={jobForm}\n />\n )}\n\n {CompFields.FlsaStatus && (\n <>\n <CompFields.FlsaStatus\n label={t('employeeClassification')}\n placeholder={t('flsaStatusPlaceholder')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationLink\"\n components={{ ClassificationLink: <Components.Link /> }}\n />\n }\n validationMessages={{\n REQUIRED: t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n getOptionLabel={(status: FlsaStatusType) => t(`flsaStatusLabels.${status}`)}\n formHookResult={compensationForm}\n />\n {(compensationForm.status.showCommissionFederalMinimumPayAlert ||\n compensationForm.status.showCommissionMinimumWageAlert ||\n compensationForm.status.showOwnerSalaryAlert ||\n compensationForm.status.willDeleteSecondaryJobs) && (\n <Flex flexDirection=\"column\" gap={0}>\n {compensationForm.status.willDeleteSecondaryJobs && (\n <Components.Alert\n label={t('validations.classificationChangeNotification')}\n status=\"warning\"\n >\n {t('validations.classificationChangeRemovesSecondaryJobs')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionFederalMinimumPayAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.federalMinimumPay.label')}\n disableScrollIntoView\n >\n {t('commissionAlerts.federalMinimumPay.body')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionMinimumWageAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.minimumWage.label')}\n disableScrollIntoView\n >\n <Trans\n t={t}\n i18nKey=\"commissionAlerts.minimumWage.body\"\n components={{\n minimumWageLink: (\n <Components.Link\n href=\"https://support.gusto.com/article/112472520100000/manage-tip-wages-distributed-service-charges-and-tip-credits-in-gusto-for-admins\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n </Components.Alert>\n )}\n {compensationForm.status.showOwnerSalaryAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.ownerSalary.label')}\n disableScrollIntoView\n />\n )}\n </Flex>\n )}\n </>\n )}\n\n {CompFields.Rate && (\n <CompFields.Rate\n label={t('wageLabel')}\n validationMessages={{\n REQUIRED: t('validations.rate'),\n RATE_MINIMUM: t('validations.nonZeroRate'),\n RATE_EXEMPT_THRESHOLD: t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.PaymentUnit && (\n <CompFields.PaymentUnit\n label={t('wageFrequencyLabel')}\n placeholder={t('paymentUnitPlaceholder')}\n description={t('paymentUnitDescription')}\n validationMessages={{ REQUIRED: t('validations.paymentUnit') }}\n getOptionLabel={(unit: PaymentUnit) => t(`paymentUnitOptions.${unit}` as const)}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDateLabel')}\n validationMessages={{\n REQUIRED: t('validations.effectiveDate'),\n EFFECTIVE_DATE_BEFORE_HIRE: t('validations.effectiveDateBeforeHire'),\n EFFECTIVE_DATE_BEFORE_MIN: t('validations.effectiveDateBeforeMin'),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.AdjustForMinimumWage && (\n <CompFields.AdjustForMinimumWage\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.MinimumWageId && (\n <CompFields.MinimumWageId\n label={t('minimumWageLabel')}\n placeholder={t('minimumWagePlaceholder')}\n description={t('minimumWageDescription')}\n validationMessages={{ REQUIRED: t('validations.minimumWage') }}\n getOptionLabel={(wage: MinimumWage) =>\n `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`\n }\n formHookResult={compensationForm}\n />\n )}\n\n {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('twoPercentShareholderLabel')}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcCovered && (\n <JobFields.StateWcCovered\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n getOptionLabel={(covered: boolean) =>\n covered ? t('stateWcCoveredOptions.yes') : t('stateWcCoveredOptions.no')\n }\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcClassCode && (\n <JobFields.StateWcClassCode\n label={t('stateWcClassCodeLabel')}\n description={t('stateWcClassCodeDescription')}\n placeholder={t('stateWcClassCodeLabel')}\n validationMessages={{ REQUIRED: t('validations.stateWcClassCode') }}\n formHookResult={jobForm}\n />\n )}\n </Flex>\n\n <ActionsLayout>\n {onCancel && (\n <Components.Button variant=\"secondary\" onClick={onCancel} isDisabled={isPending}>\n {t('cancelCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {submitCtaLabel}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["ManagementCompensationFormBody","jobForm","compensationForm","title","submitCtaLabel","isPending","onCancel","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","jsx","Fragment","Trans","FLSA_OVERTIME_SALARY_LIMIT","status","unit","wage","covered","ActionsLayout"],"mappings":";;;;;;;;AA8BO,SAASA,EAA+B;AAAA,EAC7C,SAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAA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,gBAAgBN;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GAEJ;AAAA,sBAECwB,GAAA,EACE,UAAA;AAAA,MAAAnB,KACC,gBAAAW,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAAU,YAAYD,GACnE,UAAAE,EAAE,WAAW,EAAA,CAChB;AAAA,MAEF,gBAAAU,EAACR,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWJ,GACzC,UAAAD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ManagementCompensationFormBody.js","sources":["../../../../../src/components/Employee/Compensation/management/ManagementCompensationFormBody.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api-v-2026-02-01/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2026-02-01/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api-v-2026-02-01/models/components/minimumwage'\nimport type { UseJobFormReady } from '../shared/useJobForm'\nimport type { UseCompensationFormReady } from '../shared/useCompensationForm'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FLSA_OVERTIME_SALARY_LIMIT } from '@/shared/constants'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\n/** @internal */\nexport interface ManagementCompensationFormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n title: string\n submitCtaLabel: string\n isPending: boolean\n onCancel?: () => void\n}\n\n/**\n * Renders the shared field layout used by both `EditCompensation` (schedule a future comp\n * change for a present job) and `EditPendingCompensation` (update an existing future comp).\n * Field visibility is driven entirely by hook configuration — the hooks expose `undefined`\n * for fields that should not render — so this component renders the correct subset for each\n * use case without extra conditional props.\n *\n * @internal\n */\nexport function ManagementCompensationFormBody({\n jobForm,\n compensationForm,\n title,\n submitCtaLabel,\n isPending,\n onCancel,\n}: ManagementCompensationFormBodyProps) {\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n const format = useNumberFormatter('currency')\n\n const JobFields = jobForm.form.Fields\n const CompFields = compensationForm.form.Fields\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n <CompFields.Title\n label={t('jobTitleLabel')}\n validationMessages={{ REQUIRED: t('validations.jobTitleSentence') }}\n formHookResult={compensationForm}\n />\n\n {JobFields.HireDate && (\n <JobFields.HireDate\n label={t('hireDateLabel')}\n validationMessages={{\n REQUIRED: t('validations.hireDate'),\n }}\n formHookResult={jobForm}\n />\n )}\n\n {CompFields.FlsaStatus && (\n <>\n <CompFields.FlsaStatus\n label={t('employeeClassification')}\n placeholder={t('flsaStatusPlaceholder')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationLink\"\n components={{ ClassificationLink: <Components.Link /> }}\n />\n }\n validationMessages={{\n REQUIRED: t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n getOptionLabel={(status: FlsaStatusType) => t(`flsaStatusLabels.${status}`)}\n formHookResult={compensationForm}\n />\n {(compensationForm.status.showCommissionFederalMinimumPayAlert ||\n compensationForm.status.showCommissionMinimumWageAlert ||\n compensationForm.status.showOwnerSalaryAlert ||\n compensationForm.status.willDeleteSecondaryJobs) && (\n <Flex flexDirection=\"column\" gap={0}>\n {compensationForm.status.willDeleteSecondaryJobs && (\n <Components.Alert\n label={t('validations.classificationChangeNotification')}\n status=\"warning\"\n >\n {t('validations.classificationChangeRemovesSecondaryJobs')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionFederalMinimumPayAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.federalMinimumPay.label')}\n disableScrollIntoView\n >\n {t('commissionAlerts.federalMinimumPay.body')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionMinimumWageAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.minimumWage.label')}\n disableScrollIntoView\n >\n <Trans\n t={t}\n i18nKey=\"commissionAlerts.minimumWage.body\"\n components={{\n minimumWageLink: (\n <Components.Link\n href=\"https://support.gusto.com/article/112472520100000/manage-tip-wages-distributed-service-charges-and-tip-credits-in-gusto-for-admins\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n </Components.Alert>\n )}\n {compensationForm.status.showOwnerSalaryAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.ownerSalary.label')}\n disableScrollIntoView\n />\n )}\n </Flex>\n )}\n </>\n )}\n\n {CompFields.Rate && (\n <CompFields.Rate\n label={t('wageLabel')}\n validationMessages={{\n REQUIRED: t('validations.rate'),\n RATE_MINIMUM: t('validations.nonZeroRate'),\n RATE_EXEMPT_THRESHOLD: t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.PaymentUnit && (\n <CompFields.PaymentUnit\n label={t('wageFrequencyLabel')}\n placeholder={t('paymentUnitPlaceholder')}\n description={t('paymentUnitDescription')}\n validationMessages={{ REQUIRED: t('validations.paymentUnit') }}\n getOptionLabel={(unit: PaymentUnit) => t(`paymentUnitOptions.${unit}` as const)}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDateLabel')}\n validationMessages={{\n REQUIRED: t('validations.effectiveDate'),\n EFFECTIVE_DATE_BEFORE_HIRE: t('validations.effectiveDateBeforeHire'),\n EFFECTIVE_DATE_BEFORE_MIN: t('validations.effectiveDateBeforeMin'),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.AdjustForMinimumWage && (\n <CompFields.AdjustForMinimumWage\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.MinimumWageId && (\n <CompFields.MinimumWageId\n label={t('minimumWageLabel')}\n placeholder={t('minimumWagePlaceholder')}\n description={t('minimumWageDescription')}\n validationMessages={{ REQUIRED: t('validations.minimumWage') }}\n getOptionLabel={(wage: MinimumWage) =>\n `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`\n }\n formHookResult={compensationForm}\n />\n )}\n\n {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('twoPercentShareholderLabel')}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcCovered && (\n <JobFields.StateWcCovered\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n getOptionLabel={(covered: boolean) =>\n covered ? t('stateWcCoveredOptions.yes') : t('stateWcCoveredOptions.no')\n }\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcClassCode && (\n <JobFields.StateWcClassCode\n label={t('stateWcClassCodeLabel')}\n description={t('stateWcClassCodeDescription')}\n placeholder={t('stateWcClassCodeLabel')}\n validationMessages={{ REQUIRED: t('validations.stateWcClassCode') }}\n formHookResult={jobForm}\n />\n )}\n </Flex>\n\n <ActionsLayout>\n {onCancel && (\n <Components.Button variant=\"secondary\" onClick={onCancel} isDisabled={isPending}>\n {t('cancelCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {submitCtaLabel}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["ManagementCompensationFormBody","jobForm","compensationForm","title","submitCtaLabel","isPending","onCancel","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","jsx","Fragment","Trans","FLS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AAA,QAAV;AAAA,UACC,OAAON,EAAE,uBAAuB;AAAA,UAChC,aAAaA,EAAE,6BAA6B;AAAA,UAC5C,aAAaA,EAAE,uBAAuB;AAAA,UACtC,oBAAoB,EAAE,UAAUA,EAAE,8BAA8B,EAAA;AAAA,UAChE,gBAAgBN;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GAEJ;AAAA,sBAECwB,GAAA,EACE,UAAA;AAAA,MAAAnB,KACC,gBAAAW,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAAU,YAAYD,GACnE,UAAAE,EAAE,WAAW,EAAA,CAChB;AAAA,MAEF,gBAAAU,EAACR,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWJ,GACzC,UAAAD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Job } from '@gusto/embedded-api-v-
|
|
2
|
-
import { FlsaStatusType } from '@gusto/embedded-api-v-
|
|
1
|
+
import { Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job';
|
|
2
|
+
import { FlsaStatusType } from '@gusto/embedded-api-v-2026-02-01/models/components/flsastatustype';
|
|
3
3
|
import { RequireAtLeastOne } from '../../../../types/Helpers';
|
|
4
4
|
import { PAY_PERIODS } from '../../../../shared/constants';
|
|
5
5
|
import { BaseComponentInterface } from '../../../Base';
|
|
@@ -58,7 +58,7 @@ export interface CompensationProps extends BaseComponentInterface<'Employee.Comp
|
|
|
58
58
|
* @param props - See {@link CompensationProps}.
|
|
59
59
|
* @returns The compensation onboarding step.
|
|
60
60
|
* @public
|
|
61
|
-
* @group Block
|
|
61
|
+
* @group Block components
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
64
|
* ```tsx
|
|
@@ -2,7 +2,7 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as c, useMemo as f } from "react";
|
|
3
3
|
import { createMachine as d } from "robot3";
|
|
4
4
|
import { useTranslation as C } from "react-i18next";
|
|
5
|
-
import { useJobsAndCompensationsGetJobsSuspense as b } from "@gusto/embedded-api-v-
|
|
5
|
+
import { useJobsAndCompensationsGetJobsSuspense as b } from "@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs";
|
|
6
6
|
import { JobsListContextual as J, InitialEditCompensationContextual as E } from "./CompensationFlowComponents.js";
|
|
7
7
|
import { compensationStateMachine as S } from "./compensationStateMachine.js";
|
|
8
8
|
import { FlsaStatus as w } from "../../../../shared/constants.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Compensation.js","sources":["../../../../../src/components/Employee/Compensation/onboarding/Compensation.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { createMachine } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsGetJobsSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsGetJobs'\nimport { type Job } from '@gusto/embedded-api-v-2025-11-15/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2025-11-15/models/components/flsastatustype'\nimport type { OnboardingContextInterface } from '../../OnboardingFlow/OnboardingFlowComponents'\nimport {\n InitialEditCompensationContextual,\n JobsListContextual,\n type CompensationFlowContextInterface,\n} from './CompensationFlowComponents'\nimport { compensationStateMachine } from './compensationStateMachine'\nimport { JobsList } from './JobsList'\nimport { EditCompensation } from './EditCompensation'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport type { PAY_PERIODS } from '@/shared/constants'\nimport { FlsaStatus } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flow } from '@/components/Flow/Flow'\nimport { useFlow } from '@/components/Flow/useFlow'\n\ntype CompensationInitialState = 'initialEditJob' | 'viewJobs'\n\ninterface InitialFlowConfig {\n initialState: CompensationInitialState\n currentJobId: string | null\n}\n\nconst INITIAL_COMPONENT_BY_STATE: Record<\n CompensationInitialState,\n React.ComponentType<CommonComponentInterface>\n> = {\n initialEditJob: InitialEditCompensationContextual,\n viewJobs: JobsListContextual,\n}\n\nfunction deriveInitialFlowConfig(employeeJobs: Job[]): InitialFlowConfig {\n if (employeeJobs.length === 0) {\n return { initialState: 'initialEditJob', currentJobId: null }\n }\n\n const onlyJob = employeeJobs.length === 1 ? (employeeJobs[0] ?? null) : null\n const onlyJobCompensation = findCurrentCompensation(onlyJob)\n\n if (onlyJob && onlyJobCompensation?.flsaStatus !== FlsaStatus.NONEXEMPT) {\n return { initialState: 'initialEditJob', currentJobId: onlyJob.uuid }\n }\n\n return { initialState: 'viewJobs', currentJobId: null }\n}\n\n/**\n * Default values for the compensation form fields.\n *\n * @remarks\n * At least one of the fields must be provided. If employee data is available\n * via the API, these values are overwritten.\n *\n * @public\n */\nexport type CompensationDefaultValues = RequireAtLeastOne<{\n /** The compensation rate (an amount in dollars). */\n rate?: Job['rate']\n /** The job title. */\n title?: Job['title']\n /** The pay period — one of `Hour`, `Week`, `Month`, `Year`, `Paycheck`. */\n paymentUnit?: (typeof PAY_PERIODS)[keyof typeof PAY_PERIODS]\n /** The FLSA classification — drives whether the role is treated as exempt, nonexempt, etc. */\n flsaStatus?: FlsaStatusType\n}>\n\n/**\n * Props for {@link Compensation}.\n *\n * @public\n */\nexport interface CompensationProps extends BaseComponentInterface<'Employee.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The date the employee will start work. */\n startDate: string\n /** Default values for the compensation form fields. If employee data is available via the API, these values are overwritten. */\n defaultValues?: CompensationDefaultValues\n}\n\n/**\n * Onboarding step for collecting an employee's role and compensation details.\n *\n * @remarks\n * Collects the job title, employee type (hourly, salary), compensation\n * amount, and pay period. For hourly employees, allows configuring multiple\n * roles. Automatically routes between editing the only job (when an employee\n * has zero or one non-Nonexempt job) and a jobs-list view (when multiple\n * roles need to be managed) on first mount; on subsequent refetches the user\n * stays on their current step.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/job/created` | Fired after a job is successfully created | {@link Job} |\n * | `employee/job/updated` | Fired after a job is successfully updated | {@link Job} |\n * | `employee/job/deleted` | Fired after a job is successfully deleted | — |\n * | `employee/compensation/updated` | Fired after compensation details are updated | {@link Compensation} |\n * | `employee/compensation/done` | Fired when compensation setup is complete and the parent flow can advance | — |\n *\n * @param props - See {@link CompensationProps}.\n * @returns The compensation onboarding step.\n * @public\n * @group Block Components\n *\n * @example\n * ```tsx\n * import { EmployeeOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <EmployeeOnboarding.Compensation\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * startDate=\"2025-01-01\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Compensation(props: CompensationProps) {\n return (\n <BaseComponent {...props}>\n <CompensationFlow {...props} />\n </BaseComponent>\n )\n}\n\nconst findCurrentCompensation = (job?: Job | null) => {\n return job?.compensations?.find(comp => comp.uuid === job.currentCompensationUuid)\n}\n\nfunction CompensationFlow({\n employeeId,\n startDate,\n defaultValues,\n dictionary,\n onEvent,\n}: CompensationProps) {\n useComponentDictionary('Employee.Compensation', dictionary)\n\n const { data: jobsData } = useJobsAndCompensationsGetJobsSuspense({ employeeId })\n\n // Capture the routing decision from the first jobsData snapshot only. Suspense\n // guarantees that snapshot is fresh on first render. Subsequent refetches (e.g.\n // the getJobs invalidation that fires between EditCompensation's awaited job +\n // compensation mutations) must NOT re-seat the machine and reset the user's\n // place in the flow. Callers needing to re-derive routing for a different\n // employee should remount via `key`, matching the contract used by\n // OnboardingFlow / PayrollExecutionFlow / DismissalFlow.\n const [{ initialState, currentJobId }] = useState<InitialFlowConfig>(() =>\n deriveInitialFlowConfig(jobsData.jobs ?? []),\n )\n\n const manageCompensation = useMemo(\n () =>\n createMachine(\n initialState,\n compensationStateMachine,\n (initialContext: CompensationFlowContextInterface) => ({\n ...initialContext,\n component: INITIAL_COMPONENT_BY_STATE[initialState],\n employeeId,\n startDate,\n partnerDefaultValues: defaultValues,\n currentJobId,\n }),\n ),\n // `defaultValues` is intentionally omitted: a partner-supplied prop that may\n // arrive as a fresh object reference each render and only seeds the form\n // once. `initialState` and `currentJobId` are stable values from useState\n // above, so they're listed here as honest deps but never trigger recompute.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [employeeId, startDate, initialState, currentJobId],\n )\n\n return <Flow machine={manageCompensation} onEvent={onEvent} />\n}\n\n/** @internal */\nexport const CompensationContextual = () => {\n const { employeeId, onEvent, startDate, defaultValues } = useFlow<OnboardingContextInterface>()\n const { t } = useTranslation('common')\n\n if (!employeeId || !startDate) {\n throw new Error(\n t('errors.missingParamsOrContext', {\n component: 'Compensation',\n param: !employeeId ? 'employeeId' : 'startDate',\n provider: 'FlowProvider',\n }),\n )\n }\n return (\n <Compensation\n employeeId={employeeId}\n startDate={startDate}\n onEvent={onEvent}\n defaultValues={defaultValues?.compensation}\n />\n )\n}\n\nCompensation.JobsList = JobsList\nCompensation.EditCompensation = EditCompensation\n"],"names":["INITIAL_COMPONENT_BY_STATE","InitialEditCompensationContextual","JobsListContextual","deriveInitialFlowConfig","employeeJobs","onlyJob","onlyJobCompensation","findCurrentCompensation","FlsaStatus","Compensation","props","jsx","BaseComponent","CompensationFlow","job","comp","employeeId","startDate","defaultValues","dictionary","onEvent","useComponentDictionary","jobsData","useJobsAndCompensationsGetJobsSuspense","initialState","currentJobId","useState","manageCompensation","useMemo","createMachine","compensationStateMachine","initialContext","Flow","CompensationContextual","useFlow","t","useTranslation","JobsList","EditCompensation"],"mappings":";;;;;;;;;;;;;;;AAkCA,MAAMA,IAGF;AAAA,EACF,gBAAgBC;AAAA,EAChB,UAAUC;AACZ;AAEA,SAASC,EAAwBC,GAAwC;AACvE,MAAIA,EAAa,WAAW;AAC1B,WAAO,EAAE,cAAc,kBAAkB,cAAc,KAAA;AAGzD,QAAMC,IAAUD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AjB,GAAY,SAAAI,GAAS,WAAAH,GAAW,eAAAC,EAAA,IAAkBgB,EAAA,GACpD,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ;AAErC,MAAI,CAACpB,KAAc,CAACC;AAClB,UAAM,IAAI;AAAA,MACRkB,EAAE,iCAAiC;AAAA,QACjC,WAAW;AAAA,QACX,OAAQnB,IAA4B,cAAf;AAAA,QACrB,UAAU;AAAA,MAAA,CACX;AAAA,IAAA;AAGL,SACE,gBAAAL;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,YAAAO;AAAA,MACA,WAAAC;AAAA,MACA,SAAAG;AAAA,MACA,eAAeF,GAAe;AAAA,IAAA;AAAA,EAAA;AAGpC;AAEAT,EAAa,WAAW4B;AACxB5B,EAAa,mBAAmB6B;"}
|
|
1
|
+
{"version":3,"file":"Compensation.js","sources":["../../../../../src/components/Employee/Compensation/onboarding/Compensation.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { createMachine } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsGetJobsSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs'\nimport { type Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2026-02-01/models/components/flsastatustype'\nimport type { OnboardingContextInterface } from '../../OnboardingFlow/OnboardingFlowComponents'\nimport {\n InitialEditCompensationContextual,\n JobsListContextual,\n type CompensationFlowContextInterface,\n} from './CompensationFlowComponents'\nimport { compensationStateMachine } from './compensationStateMachine'\nimport { JobsList } from './JobsList'\nimport { EditCompensation } from './EditCompensation'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport type { PAY_PERIODS } from '@/shared/constants'\nimport { FlsaStatus } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flow } from '@/components/Flow/Flow'\nimport { useFlow } from '@/components/Flow/useFlow'\n\ntype CompensationInitialState = 'initialEditJob' | 'viewJobs'\n\ninterface InitialFlowConfig {\n initialState: CompensationInitialState\n currentJobId: string | null\n}\n\nconst INITIAL_COMPONENT_BY_STATE: Record<\n CompensationInitialState,\n React.ComponentType<CommonComponentInterface>\n> = {\n initialEditJob: InitialEditCompensationContextual,\n viewJobs: JobsListContextual,\n}\n\nfunction deriveInitialFlowConfig(employeeJobs: Job[]): InitialFlowConfig {\n if (employeeJobs.length === 0) {\n return { initialState: 'initialEditJob', currentJobId: null }\n }\n\n const onlyJob = employeeJobs.length === 1 ? (employeeJobs[0] ?? null) : null\n const onlyJobCompensation = findCurrentCompensation(onlyJob)\n\n if (onlyJob && onlyJobCompensation?.flsaStatus !== FlsaStatus.NONEXEMPT) {\n return { initialState: 'initialEditJob', currentJobId: onlyJob.uuid }\n }\n\n return { initialState: 'viewJobs', currentJobId: null }\n}\n\n/**\n * Default values for the compensation form fields.\n *\n * @remarks\n * At least one of the fields must be provided. If employee data is available\n * via the API, these values are overwritten.\n *\n * @public\n */\nexport type CompensationDefaultValues = RequireAtLeastOne<{\n /** The compensation rate (an amount in dollars). */\n rate?: Job['rate']\n /** The job title. */\n title?: Job['title']\n /** The pay period — one of `Hour`, `Week`, `Month`, `Year`, `Paycheck`. */\n paymentUnit?: (typeof PAY_PERIODS)[keyof typeof PAY_PERIODS]\n /** The FLSA classification — drives whether the role is treated as exempt, nonexempt, etc. */\n flsaStatus?: FlsaStatusType\n}>\n\n/**\n * Props for {@link Compensation}.\n *\n * @public\n */\nexport interface CompensationProps extends BaseComponentInterface<'Employee.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The date the employee will start work. */\n startDate: string\n /** Default values for the compensation form fields. If employee data is available via the API, these values are overwritten. */\n defaultValues?: CompensationDefaultValues\n}\n\n/**\n * Onboarding step for collecting an employee's role and compensation details.\n *\n * @remarks\n * Collects the job title, employee type (hourly, salary), compensation\n * amount, and pay period. For hourly employees, allows configuring multiple\n * roles. Automatically routes between editing the only job (when an employee\n * has zero or one non-Nonexempt job) and a jobs-list view (when multiple\n * roles need to be managed) on first mount; on subsequent refetches the user\n * stays on their current step.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/job/created` | Fired after a job is successfully created | {@link Job} |\n * | `employee/job/updated` | Fired after a job is successfully updated | {@link Job} |\n * | `employee/job/deleted` | Fired after a job is successfully deleted | — |\n * | `employee/compensation/updated` | Fired after compensation details are updated | {@link Compensation} |\n * | `employee/compensation/done` | Fired when compensation setup is complete and the parent flow can advance | — |\n *\n * @param props - See {@link CompensationProps}.\n * @returns The compensation onboarding step.\n * @public\n * @group Block components\n *\n * @example\n * ```tsx\n * import { EmployeeOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <EmployeeOnboarding.Compensation\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * startDate=\"2025-01-01\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Compensation(props: CompensationProps) {\n return (\n <BaseComponent {...props}>\n <CompensationFlow {...props} />\n </BaseComponent>\n )\n}\n\nconst findCurrentCompensation = (job?: Job | null) => {\n return job?.compensations?.find(comp => comp.uuid === job.currentCompensationUuid)\n}\n\nfunction CompensationFlow({\n employeeId,\n startDate,\n defaultValues,\n dictionary,\n onEvent,\n}: CompensationProps) {\n useComponentDictionary('Employee.Compensation', dictionary)\n\n const { data: jobsData } = useJobsAndCompensationsGetJobsSuspense({ employeeId })\n\n // Capture the routing decision from the first jobsData snapshot only. Suspense\n // guarantees that snapshot is fresh on first render. Subsequent refetches (e.g.\n // the getJobs invalidation that fires between EditCompensation's awaited job +\n // compensation mutations) must NOT re-seat the machine and reset the user's\n // place in the flow. Callers needing to re-derive routing for a different\n // employee should remount via `key`, matching the contract used by\n // OnboardingFlow / PayrollExecutionFlow / DismissalFlow.\n const [{ initialState, currentJobId }] = useState<InitialFlowConfig>(() =>\n deriveInitialFlowConfig(jobsData.jobs ?? []),\n )\n\n const manageCompensation = useMemo(\n () =>\n createMachine(\n initialState,\n compensationStateMachine,\n (initialContext: CompensationFlowContextInterface) => ({\n ...initialContext,\n component: INITIAL_COMPONENT_BY_STATE[initialState],\n employeeId,\n startDate,\n partnerDefaultValues: defaultValues,\n currentJobId,\n }),\n ),\n // `defaultValues` is intentionally omitted: a partner-supplied prop that may\n // arrive as a fresh object reference each render and only seeds the form\n // once. `initialState` and `currentJobId` are stable values from useState\n // above, so they're listed here as honest deps but never trigger recompute.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [employeeId, startDate, initialState, currentJobId],\n )\n\n return <Flow machine={manageCompensation} onEvent={onEvent} />\n}\n\n/** @internal */\nexport const CompensationContextual = () => {\n const { employeeId, onEvent, startDate, defaultValues } = useFlow<OnboardingContextInterface>()\n const { t } = useTranslation('common')\n\n if (!employeeId || !startDate) {\n throw new Error(\n t('errors.missingParamsOrContext', {\n component: 'Compensation',\n param: !employeeId ? 'employeeId' : 'startDate',\n provider: 'FlowProvider',\n }),\n )\n }\n return (\n <Compensation\n employeeId={employeeId}\n startDate={startDate}\n onEvent={onEvent}\n defaultValues={defaultValues?.compensation}\n />\n )\n}\n\nCompensation.JobsList = JobsList\nCompensation.EditCompensation = EditCompensation\n"],"names":["INITIAL_COMPONENT_BY_STATE","InitialEditCompensationContextual","JobsListContextual","deriveInitialFlowConfig","employeeJobs","onlyJob","onlyJobCompensation","findCurrentCompensation","FlsaStatus","Compensation","props","jsx","BaseComponent","CompensationFlow","job","comp","employeeId","startDate","defaultValues","dictionary","onEvent","useComponentDictionary","jobsData","useJobsAndCompensationsGetJobsSuspense","initialState","currentJobId","useState","manageCompensation","useMemo","createMachine","compensationStateMachine","initialContext","Flow","CompensationContextual","useFlow","t","useTranslation","JobsList","EditCompensation"],"mappings":";;;;;;;;;;;;;;;AAkCA,MAAMA,IAGF;AAAA,EACF,gBAAgBC;AAAA,EAChB,UAAUC;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,SAAO,gBAAAd,EAACqB,GAAA,EAAK,SAASL,GAAoB,SAAAP,EAAA,CAAkB;AAC9D;AAGO,MAAMa,IAAyB,MAAM;AAC1C,QAAM,EAAE,YAAAjB,GAAY,SAAAI,GAAS,WAAAH,GAAW,eAAAC,EAAA,IAAkBgB,EAAA,GACpD,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ;AAErC,MAAI,CAACpB,KAAc,CAACC;AAClB,UAAM,IAAI;AAAA,MACRkB,EAAE,iCAAiC;AAAA,QACjC,WAAW;AAAA,QACX,OAAQnB,IAA4B,cAAf;AAAA,QACrB,UAAU;AAAA,MAAA,CACX;AAAA,IAAA;AAGL,SACE,gBAAAL;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,YAAAO;AAAA,MACA,WAAAC;AAAA,MACA,SAAAG;AAAA,MACA,eAAeF,GAAe;AAAA,IAAA;AAAA,EAAA;AAGpC;AAEAT,EAAa,WAAW4B;AACxB5B,EAAa,mBAAmB6B;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Job } from '@gusto/embedded-api-v-
|
|
2
|
-
import { Compensation } from '@gusto/embedded-api-v-
|
|
1
|
+
import { Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job';
|
|
2
|
+
import { Compensation } from '@gusto/embedded-api-v-2026-02-01/models/components/compensation';
|
|
3
3
|
import { CompensationDefaultValues } from './Compensation';
|
|
4
4
|
import { FlowContextInterface } from '../../../Flow/useFlow';
|
|
5
5
|
import { componentEvents } from '../../../../shared/constants';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompensationFlowComponents.js","sources":["../../../../../src/components/Employee/Compensation/onboarding/CompensationFlowComponents.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Job } from '@gusto/embedded-api-v-
|
|
1
|
+
{"version":3,"file":"CompensationFlowComponents.js","sources":["../../../../../src/components/Employee/Compensation/onboarding/CompensationFlowComponents.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job'\nimport type { Compensation } from '@gusto/embedded-api-v-2026-02-01/models/components/compensation'\nimport type { CompensationDefaultValues } from './Compensation'\nimport { JobsList } from './JobsList'\nimport { EditCompensation } from './EditCompensation'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, FlsaStatus, type EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/** @internal */\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_JOB_ADD]: undefined\n [componentEvents.EMPLOYEE_JOB_EDIT]: { uuid: string }\n [componentEvents.EMPLOYEE_JOB_CREATED]: Job\n [componentEvents.EMPLOYEE_JOB_UPDATED]: Job\n [componentEvents.EMPLOYEE_JOB_DELETED]: undefined\n [componentEvents.EMPLOYEE_COMPENSATION_UPDATED]: Compensation\n [componentEvents.EMPLOYEE_COMPENSATION_RETURN_TO_LIST]: undefined\n [componentEvents.EMPLOYEE_COMPENSATION_CANCEL]: undefined\n [componentEvents.EMPLOYEE_COMPENSATION_DONE]: undefined\n}\n\n/** @internal */\nexport interface CompensationFlowContextInterface extends FlowContextInterface {\n employeeId: string\n startDate: string\n currentJobId?: string | null\n partnerDefaultValues?: CompensationDefaultValues\n}\n\n/** @internal */\nexport function JobsListContextual() {\n const { employeeId, onEvent } = useFlow<CompensationFlowContextInterface>()\n return <JobsList employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\n/** @internal */\nexport function InitialEditCompensationContextual() {\n const { employeeId, startDate, currentJobId, partnerDefaultValues, onEvent } =\n useFlow<CompensationFlowContextInterface>()\n useI18n('Employee.Compensation')\n const { t } = useTranslation('Employee.Compensation')\n\n const handleEvent: OnEventType<EventType, unknown> = (event, data) => {\n onEvent(event, data)\n if (event === componentEvents.EMPLOYEE_COMPENSATION_UPDATED) {\n const compensation = data as Compensation\n if (compensation.flsaStatus !== FlsaStatus.NONEXEMPT) {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_DONE)\n } else {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_RETURN_TO_LIST)\n }\n }\n }\n\n return (\n <EditCompensation\n employeeId={ensureRequired(employeeId)}\n startDate={ensureRequired(startDate)}\n currentJobId={currentJobId}\n title={t('title')}\n submitCtaLabel={t('submitCta')}\n partnerDefaultValues={partnerDefaultValues}\n onEvent={handleEvent}\n />\n )\n}\n\n/** @internal */\nexport function EditCompensationContextual() {\n const { employeeId, startDate, currentJobId, partnerDefaultValues, onEvent } =\n useFlow<CompensationFlowContextInterface>()\n useI18n('Employee.Compensation')\n const { t } = useTranslation('Employee.Compensation')\n\n const handleEvent: OnEventType<EventType, unknown> = (event, data) => {\n onEvent(event, data)\n if (event === componentEvents.EMPLOYEE_COMPENSATION_UPDATED) {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_RETURN_TO_LIST)\n }\n }\n\n return (\n <EditCompensation\n employeeId={ensureRequired(employeeId)}\n startDate={ensureRequired(startDate)}\n currentJobId={currentJobId}\n title={currentJobId ? t('editTitle') : t('addTitle')}\n submitCtaLabel={t('saveNewJobCta')}\n onCancel={() => {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_CANCEL)\n }}\n partnerDefaultValues={partnerDefaultValues}\n onEvent={handleEvent}\n />\n )\n}\n"],"names":["JobsListContextual","employeeId","onEvent","useFlow","JobsList","ensureRequired","InitialEditCompensationContextual","startDate","currentJobId","partnerDefaultValues","useI18n","t","useTranslation","handleEvent","event","data","componentEvents","FlsaStatus","jsx","EditCompensation","EditCompensationContextual"],"mappings":";;;;;;;;AAkCO,SAASA,IAAqB;AACnC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAChC,2BAAQC,GAAA,EAAS,YAAYC,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AAC7E;AAGO,SAASI,IAAoC;AAClD,QA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A,MACtD;AAAA,MACA,sBAAAP;AAAA,MACA,SAASI;AAAA,IAAA;AAAA,EAAA;AAGf;"}
|
|
@@ -4,5 +4,24 @@ export interface JobsListProps extends BaseComponentInterface<'Employee.Compensa
|
|
|
4
4
|
/** The associated employee identifier. */
|
|
5
5
|
employeeId: string;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Lists an employee's jobs alongside their compensation details, with controls to add, edit,
|
|
9
|
+
* or remove a job.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Used for employees who hold multiple roles. The primary job's FLSA classification determines
|
|
13
|
+
* whether the employee is treated as exempt or nonexempt.
|
|
14
|
+
*
|
|
15
|
+
* @events
|
|
16
|
+
* | Event | Description | Data |
|
|
17
|
+
* | ----- | ----------- | ---- |
|
|
18
|
+
* | `employee/job/add` | Fired when the user chooses to add a job | none |
|
|
19
|
+
* | `employee/job/edit` | Fired when the user chooses to edit a job | `{ uuid: string }` |
|
|
20
|
+
* | `employee/job/deleted` | Fired after a job is successfully deleted | none |
|
|
21
|
+
* | `employee/compensations/done` | Fired when the user continues past the jobs list | none |
|
|
22
|
+
*
|
|
23
|
+
* @param props - See {@link JobsListProps}.
|
|
24
|
+
* @returns The employee's jobs list.
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
8
27
|
export declare function JobsList(props: JobsListProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as r } from "react";
|
|
3
|
-
import { useJobsAndCompensationsGetJobsSuspense as f } from "@gusto/embedded-api-v-
|
|
4
|
-
import { useJobsAndCompensationsDeleteMutation as D } from "@gusto/embedded-api-v-
|
|
3
|
+
import { useJobsAndCompensationsGetJobsSuspense as f } from "@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs";
|
|
4
|
+
import { useJobsAndCompensationsDeleteMutation as D } from "@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsDelete";
|
|
5
5
|
import { derivePrimaryFlsaStatus as b } from "../../shared/derivePrimaryFlsaStatus.js";
|
|
6
6
|
import { JobsListPresentation as y } from "./JobsListPresentation.js";
|
|
7
7
|
import { BaseComponent as C } from "../../../../Base/Base.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobsList.js","sources":["../../../../../../src/components/Employee/Compensation/onboarding/JobsList/JobsList.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useJobsAndCompensationsGetJobsSuspense } from '@gusto/embedded-api-v-
|
|
1
|
+
{"version":3,"file":"JobsList.js","sources":["../../../../../../src/components/Employee/Compensation/onboarding/JobsList/JobsList.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useJobsAndCompensationsGetJobsSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs'\nimport { useJobsAndCompensationsDeleteMutation } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsDelete'\nimport { derivePrimaryFlsaStatus } from '../../shared/derivePrimaryFlsaStatus'\nimport { JobsListPresentation } from './JobsListPresentation'\nimport { BaseComponent, type BaseComponentInterface, useBase } from '@/components/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\n/** @public */\nexport interface JobsListProps extends BaseComponentInterface<'Employee.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Lists an employee's jobs alongside their compensation details, with controls to add, edit,\n * or remove a job.\n *\n * @remarks\n * Used for employees who hold multiple roles. The primary job's FLSA classification determines\n * whether the employee is treated as exempt or nonexempt.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/job/add` | Fired when the user chooses to add a job | none |\n * | `employee/job/edit` | Fired when the user chooses to edit a job | `{ uuid: string }` |\n * | `employee/job/deleted` | Fired after a job is successfully deleted | none |\n * | `employee/compensations/done` | Fired when the user continues past the jobs list | none |\n *\n * @param props - See {@link JobsListProps}.\n * @returns The employee's jobs list.\n * @public\n */\nexport function JobsList(props: JobsListProps) {\n useComponentDictionary('Employee.Compensation', props.dictionary)\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className }: JobsListProps) {\n useI18n('Employee.Compensation')\n const { onEvent } = useBase()\n\n const { data: jobsData } = useJobsAndCompensationsGetJobsSuspense({ employeeId })\n const employeeJobs = useMemo(() => jobsData.jobs ?? [], [jobsData.jobs])\n\n const { mutateAsync: deleteEmployeeJob, isPending: isDeleting } =\n useJobsAndCompensationsDeleteMutation()\n\n const primaryFlsaStatus = useMemo(() => derivePrimaryFlsaStatus(employeeJobs), [employeeJobs])\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_JOB_ADD)\n }\n\n const handleEdit = (jobId: string) => {\n onEvent(componentEvents.EMPLOYEE_JOB_EDIT, { uuid: jobId })\n }\n\n const handleDelete = async (jobId: string) => {\n await deleteEmployeeJob({ request: { jobId } })\n onEvent(componentEvents.EMPLOYEE_JOB_DELETED)\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_DONE)\n }\n\n return (\n <section className={className}>\n <JobsListPresentation\n jobs={employeeJobs}\n primaryFlsaStatus={primaryFlsaStatus}\n isPending={isDeleting}\n onAdd={handleAdd}\n onEdit={handleEdit}\n onDelete={(jobId: string) => {\n void handleDelete(jobId)\n }}\n onContinue={handleContinue}\n />\n </section>\n )\n}\n"],"names":["JobsList","props","useComponentDictionary","jsx","BaseComponent","Root","employeeId","className","useI18n","onEvent","useBase","jobsData","useJobsAndCompensationsGetJobsSuspense","employeeJobs","useMemo","deleteEmployeeJob","isDeleting","useJobsAndCompensationsDeleteMutation","primaryFlsaStatus","derivePrimaryFlsaStatus","handleAdd","componentEvents","handleEdit","jobId","handleDelete","JobsListPresentation"],"mappings":";;;;;;;;;;AAmCO,SAASA,EAASC,GAAsB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